[PR #133] [CLOSED] Split makeRequest to enable populating existing URLRequest and add testing target #528

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

📋 Pull Request Information

Original PR: https://github.com/OAuthSwift/OAuthSwift/pull/133
Author: @BeesBoxler
Created: 10/26/2015
Status: Closed

Base: masterHead: curoo-changes


📝 Commits (6)

  • 391794b Check the http url response's status code before using it
  • 036fb2f Split makeRequest to enable populating existing URLRequest
  • 0ba122d Checking localised description exists
  • bc1aa46 Move NSHTTPURLResponse into guard let
  • 5036053 Add testing target
  • bd5a7bf Setup pods

📊 Changes

8 files changed (+404 additions, -65 deletions)

View changed files

📝 OAuthSwift.xcodeproj/project.pbxproj (+204 -2)
📝 OAuthSwift.xcodeproj/xcshareddata/xcschemes/OAuthSwift.xcscheme (+10 -0)
OAuthSwift.xcworkspace/contents.xcworkspacedata (+10 -0)
📝 OAuthSwift/OAuthSwiftHTTPRequest.swift (+69 -63)
OAuthSwiftTests/Info.plist (+24 -0)
OAuthSwiftTests/OAuthSwiftHTTPRequestTests.swift (+60 -0)
OAuthSwiftTests/OAuthSwiftTests.swift (+15 -0)
Podfile (+12 -0)

📄 Description

  • Previously the NSHTTPURLResponse's status code passed to the completion handler of dataTaskWithRequest in start() in OAuthSwiftHTTPRequest was only checked after the response and data objects had been used. This PR fixes that.
  • This adds a new class method setupRequestForOAuth(_:) to OAuthSwiftHTTPRequest that allows you to specify an existing url request.

🔄 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/133 **Author:** [@BeesBoxler](https://github.com/BeesBoxler) **Created:** 10/26/2015 **Status:** ❌ Closed **Base:** `master` ← **Head:** `curoo-changes` --- ### 📝 Commits (6) - [`391794b`](https://github.com/OAuthSwift/OAuthSwift/commit/391794bbce60458925cffe33745facc1de1f108b) Check the http url response's status code before using it - [`036fb2f`](https://github.com/OAuthSwift/OAuthSwift/commit/036fb2fbfcfbf9f68fbefba4a71d135761f65847) Split `makeRequest` to enable populating existing URLRequest - [`0ba122d`](https://github.com/OAuthSwift/OAuthSwift/commit/0ba122d4ce24ef808eb20d32879ec9028a1b85d8) Checking localised description exists - [`bc1aa46`](https://github.com/OAuthSwift/OAuthSwift/commit/bc1aa463f45ea1ab52c811c0b74f9037dd1ca95c) Move NSHTTPURLResponse into guard let - [`5036053`](https://github.com/OAuthSwift/OAuthSwift/commit/5036053dce810ff3757f61ae7738031bd9b0dde0) Add testing target - [`bd5a7bf`](https://github.com/OAuthSwift/OAuthSwift/commit/bd5a7bfb71ea3ea97861f0707782f4fcc4d3f98c) Setup pods ### 📊 Changes **8 files changed** (+404 additions, -65 deletions) <details> <summary>View changed files</summary> 📝 `OAuthSwift.xcodeproj/project.pbxproj` (+204 -2) 📝 `OAuthSwift.xcodeproj/xcshareddata/xcschemes/OAuthSwift.xcscheme` (+10 -0) ➕ `OAuthSwift.xcworkspace/contents.xcworkspacedata` (+10 -0) 📝 `OAuthSwift/OAuthSwiftHTTPRequest.swift` (+69 -63) ➕ `OAuthSwiftTests/Info.plist` (+24 -0) ➕ `OAuthSwiftTests/OAuthSwiftHTTPRequestTests.swift` (+60 -0) ➕ `OAuthSwiftTests/OAuthSwiftTests.swift` (+15 -0) ➕ `Podfile` (+12 -0) </details> ### 📄 Description - Previously the NSHTTPURLResponse's status code passed to the completion handler of dataTaskWithRequest in start() in OAuthSwiftHTTPRequest was only checked after the response and data objects had been used. This PR fixes that. - This adds a new class method setupRequestForOAuth(_:) to OAuthSwiftHTTPRequest that allows you to specify an existing url request. --- <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:18 +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#528
No description provided.