Skip to content

Commit

Permalink
Merge pull request #3 from jrmiddle/master
Browse files Browse the repository at this point in the history
Explicitly request application/json when fetching a token; fixes GitH…
  • Loading branch information
evermeer authored Jul 11, 2016
2 parents 5f4f883 + e052cca commit 7370ee5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions AlamofireOauth2/OAuth2Client.swift
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ class OAuth2Client : NSObject {
Alamofire.request(.POST,
url,
parameters: parameters,
encoding: Alamofire.ParameterEncoding.URL)
encoding: Alamofire.ParameterEncoding.URL,
headers: [
"Accept": "application/json",
])
.responseJSON(completionHandler: { (response) -> Void in
switch response.result {
case .Success(let json):
Expand Down Expand Up @@ -167,7 +170,10 @@ class OAuth2Client : NSObject {
Alamofire.request(.POST,
url,
parameters: parameters,
encoding: Alamofire.ParameterEncoding.URL)
encoding: Alamofire.ParameterEncoding.URL,
headers: [
"Accept": "application/json",
])
.responseJSON { (response) -> Void in
switch response.result {
case .Success(let json):
Expand Down

0 comments on commit 7370ee5

Please sign in to comment.