mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #284] Headers get overwritten with nil #168
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#168
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jwrigh26 on GitHub (Oct 5, 2016).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/284
This is caused because on line 203 of OAuth2Swift.swift:
var headers: [String:String]? = nilThe headers passed in the from the method get overwritten by the local variable headers and therefore are never used. By changing the code to
var headers: [String:String]? = headersI was successful with getting OAuth to happen.
@phimage commented on GitHub (Oct 5, 2016):
"var headers: [String:String]? = nil" is an old code
version 0.6 introduce the headers in function parameters
will be fixed
@jwrigh26 commented on GitHub (Oct 5, 2016):
I see. Yes my bad I thought our team was using master but it turns out we are still on the swift3.0 branch. Do you know when this will be fixed for Swift3.0?
@phimage commented on GitHub (Oct 5, 2016):
I have a probleme with my code now, I can compil due to segmentation fault 11 (and weird error dataTask ambigous, JSOnSErialisation.data not exist..)
The solution I want to commit when I can
var finalHeaders: [String:String]? = headers
then finalHeaders += instead of headers =
then use finalHeads in request function
@jwrigh26 commented on GitHub (Oct 5, 2016):
Awesome! Looking forward to the solution. Thank you for the fast response. Sending positive energy your way on resolving the wonderful Xcode compile issues.