[PR #160] [MERGED] add multiparts parameter to postMultiPartRequest #541

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

📋 Pull Request Information

Original PR: https://github.com/OAuthSwift/OAuthSwift/pull/160
Author: @tkawaji
Created: 12/18/2015
Status: Merged
Merged: 12/18/2015
Merged by: @phimage

Base: masterHead: add_photo_upload


📝 Commits (4)

  • 4d09ccc add multiparts parameter to postMultiPartRequest
  • 629a29a fix postMultiPartRequest signature
  • 771627c change OAuthSwiftMultipartData from class to struct
  • 8f12ae1 Re-add OAuthSwiftMultipartData to each target in XCode

📊 Changes

3 files changed (+58 additions, -3 deletions)

View changed files

📝 OAuthSwift.xcodeproj/project.pbxproj (+10 -0)
📝 OAuthSwift/OAuthSwiftClient.swift (+23 -3)
OAuthSwift/OAuthSwiftMultipartData.swift (+25 -0)

📄 Description

Hi, thank you for great library.

I want to upload image with postMultiPartRequest, but I can't.
So I created OAuthSwiftMultipartData class for passing multiparat data,
and add method which can receive array of this instance.

How to use:

let fileData = OAuthSwiftMultipartData(name: "photo", data: imageData, fileName: "file.jpg", mimeType: "image/jpeg")
let multiparts = [fileData]
oauthswift.client.postMultiPartRequest("upload.json", method: .POST, parameters: parameters, multiparts: multiparts, success: {}, failure: {})

Thank you.


🔄 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/160 **Author:** [@tkawaji](https://github.com/tkawaji) **Created:** 12/18/2015 **Status:** ✅ Merged **Merged:** 12/18/2015 **Merged by:** [@phimage](https://github.com/phimage) **Base:** `master` ← **Head:** `add_photo_upload` --- ### 📝 Commits (4) - [`4d09ccc`](https://github.com/OAuthSwift/OAuthSwift/commit/4d09cccb3d49ef8ba783a5d9fb93fe2549ee7491) add multiparts parameter to postMultiPartRequest - [`629a29a`](https://github.com/OAuthSwift/OAuthSwift/commit/629a29a51ad0f091a2ff34e510f6e01e304305f1) fix postMultiPartRequest signature - [`771627c`](https://github.com/OAuthSwift/OAuthSwift/commit/771627cbc586883e4cf3424a67ec49f17462e5b0) change OAuthSwiftMultipartData from class to struct - [`8f12ae1`](https://github.com/OAuthSwift/OAuthSwift/commit/8f12ae1d8ab67bfa9031041466d9c828f391f357) Re-add OAuthSwiftMultipartData to each target in XCode ### 📊 Changes **3 files changed** (+58 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `OAuthSwift.xcodeproj/project.pbxproj` (+10 -0) 📝 `OAuthSwift/OAuthSwiftClient.swift` (+23 -3) ➕ `OAuthSwift/OAuthSwiftMultipartData.swift` (+25 -0) </details> ### 📄 Description Hi, thank you for great library. I want to upload image with postMultiPartRequest, but I can't. So I created OAuthSwiftMultipartData class for passing multiparat data, and add method which can receive array of this instance. How to use: ``` let fileData = OAuthSwiftMultipartData(name: "photo", data: imageData, fileName: "file.jpg", mimeType: "image/jpeg") let multiparts = [fileData] oauthswift.client.postMultiPartRequest("upload.json", method: .POST, parameters: parameters, multiparts: multiparts, success: {}, failure: {}) ``` Thank you. --- <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:20 +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#541
No description provided.