[PR #286] [MERGED] Fix multipart request with some parameters (swift 2.2) #595

Closed
opened 2026-03-03 16:49:37 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/OAuthSwift/OAuthSwift/pull/286
Author: @ktakayama
Created: 10/7/2016
Status: Merged
Merged: 10/7/2016
Merged by: @phimage

Base: swift2.2Head: fix-multipart-with-parameter-swift2.2


📝 Commits (3)

  • 21e870a Fix request.HTTPBody would be overridden by argument of parameters in postImage()
  • 02a30cb Remove duplicate code and add test public method
  • 123a765 Add makeMultiPartRequest to remove duplicate code

📊 Changes

3 files changed (+69 additions, -40 deletions)

View changed files

📝 OAuthSwift/OAuthSwiftClient.swift (+31 -40)
📝 OAuthSwift/OAuthSwiftHTTPRequest.swift (+3 -0)
📝 OAuthSwiftTests/OAuthSwiftClientTests.swift (+35 -0)

📄 Description

A request body would be overridden by query parameters with multipart request.

For example:

  • SUCCESS: client.postImage(url, parameters: [:], image: imageData, ....
  • FAILURE: client.postImage(url, parameters: parameters, image: imageData, ....

just a fix of this issue is in 21e870acca

I will create pull request to master too later :D


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/OAuthSwift/OAuthSwift/pull/286 **Author:** [@ktakayama](https://github.com/ktakayama) **Created:** 10/7/2016 **Status:** ✅ Merged **Merged:** 10/7/2016 **Merged by:** [@phimage](https://github.com/phimage) **Base:** `swift2.2` ← **Head:** `fix-multipart-with-parameter-swift2.2` --- ### 📝 Commits (3) - [`21e870a`](https://github.com/OAuthSwift/OAuthSwift/commit/21e870acca7e169c871e1d15b0df4fd13a7f2086) Fix request.HTTPBody would be overridden by argument of parameters in postImage() - [`02a30cb`](https://github.com/OAuthSwift/OAuthSwift/commit/02a30cbd6f39764385f5bd6b5fa81dfa0b674a58) Remove duplicate code and add test public method - [`123a765`](https://github.com/OAuthSwift/OAuthSwift/commit/123a7659aef75f84afeb0e7b2f0f6beddf7507e1) Add makeMultiPartRequest to remove duplicate code ### 📊 Changes **3 files changed** (+69 additions, -40 deletions) <details> <summary>View changed files</summary> 📝 `OAuthSwift/OAuthSwiftClient.swift` (+31 -40) 📝 `OAuthSwift/OAuthSwiftHTTPRequest.swift` (+3 -0) 📝 `OAuthSwiftTests/OAuthSwiftClientTests.swift` (+35 -0) </details> ### 📄 Description A request body would be overridden by query parameters with multipart request. For example: - SUCCESS: client.postImage(url, parameters: [:], image: imageData, .... - FAILURE: client.postImage(url, parameters: parameters, image: imageData, .... just a fix of this issue is in 21e870acca7e169c871e1d15b0df4fd13a7f2086 I will create pull request to master too later :D --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 16:49:37 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#595
No description provided.