Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updates requestWithMethod:path:params to not use post or query params…

…. Updates authorization request to use query params.
  • Loading branch information...
commit a67b05f2e7dee56220cdba6927cc1dbf697cb867 1 parent f98e76f
@jnormore jnormore authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 AFOAuth1Client/AFOAuth1Client.m
View
8 AFOAuth1Client/AFOAuth1Client.m
@@ -277,10 +277,12 @@ - (void)authorizeUsingOAuthWithRequestTokenPath:(NSString *)requestTokenPath
NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
[parameters setValue:requestToken.key forKey:@"oauth_token"];
+ NSMutableURLRequest *request = [super requestWithMethod:@"GET" path:userAuthorizationPath parameters:parameters];
+ [request setHTTPShouldHandleCookies:NO];
#if __IPHONE_OS_VERSION_MIN_REQUIRED
- [[UIApplication sharedApplication] openURL:[[self requestWithMethod:@"GET" path:userAuthorizationPath parameters:parameters] URL]];
+ [[UIApplication sharedApplication] openURL:[request URL]];
#else
- [[NSWorkspace sharedWorkspace] openURL:[[self requestWithMethod:@"GET" path:userAuthorizationPath parameters:parameters] URL]];
+ [[NSWorkspace sharedWorkspace] openURL:[request URL]];
#endif
} failure:^(NSError *error) {
if (failure) {
@@ -349,7 +351,7 @@ - (NSMutableURLRequest *)requestWithMethod:(NSString *)method
path:(NSString *)path
parameters:(NSDictionary *)parameters
{
- NSMutableURLRequest *request = [super requestWithMethod:method path:path parameters:parameters];
+ NSMutableURLRequest *request = [super requestWithMethod:method path:path parameters:nil];
[request setValue:[self authorizationHeaderForMethod:method path:path parameters:parameters] forHTTPHeaderField:@"Authorization"];
[request setHTTPShouldHandleCookies:NO];
Please sign in to comment.
Something went wrong with that request. Please try again.