Skip to content

Commit cf36ae1

Browse files
committed
fix issue #142, POST,PUT and PATCH should use form encoded date not the other way around
1 parent 5a818c1 commit cf36ae1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/OAuth2Client/NXOAuth2Request.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ - (void)applyParameters:(NSDictionary *)someParameters onRequest:(NSMutableURLRe
157157
if (!someParameters) return;
158158

159159
NSString *httpMethod = [aRequest HTTPMethod];
160-
if ([@[@"POST",@"PUT",@"PATCH"] containsObject: [httpMethod uppercaseString]]) {
160+
if (![@[@"POST",@"PUT",@"PATCH"] containsObject: [httpMethod uppercaseString]]) {
161161
aRequest.URL = [aRequest.URL nxoauth2_URLByAddingParameters:someParameters];
162162
} else {
163163
NSInputStream *postBodyStream = [[NXOAuth2PostBodyStream alloc] initWithParameters:parameters];

0 commit comments

Comments
 (0)