Skip to content

Commit a7583c9

Browse files
marcransomestigi
authored andcommitted
Adding explicit 'Accept' request-header field for application/json media type
1 parent ddbea2d commit a7583c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/OAuth2Client/NXOAuth2Connection.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ - (NSURLConnection *)createConnection;
197197
[startRequest setValue:client.userAgent forHTTPHeaderField:@"User-Agent"];
198198
}
199199

200+
[startRequest setValue:@"application/json" forHTTPHeaderField:@"Accept"];
201+
200202
NSURLConnection *aConnection = [[NSURLConnection alloc] initWithRequest:startRequest delegate:self startImmediately:NO]; // don't start yet
201203
[aConnection scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; // let's first schedule it in the current runloop. (see http://github.com/soundcloud/cocoa-api-wrapper/issues#issue/2 )
202204
[aConnection start]; // now start

0 commit comments

Comments
 (0)