Skip to content

Commit baf1a0b

Browse files
committed
Merge pull request p2#1 from vojto/patch-1
Great, thanks! This shouldn't cause problems with other services so I guess it makes sense to just always set the `Accept` header for token exchange requests.
2 parents 356b7e9 + 6280425 commit baf1a0b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

OAuth2/OAuth2CodeGrant.swift

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public class OAuth2CodeGrant: OAuth2 {
6161
let post = NSMutableURLRequest(URL: comp.URL!)
6262
post.HTTPMethod = "POST"
6363
post.setValue("application/x-www-form-urlencoded; charset=utf-8", forHTTPHeaderField: "Content-Type")
64+
post.setValue("application/json", forHTTPHeaderField: "Accept")
6465
post.HTTPBody = body?.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: true)
6566

6667
return post

0 commit comments

Comments
 (0)