Skip to content

Commit ce59e9d

Browse files
committed
Fixed problem with multiple post params
1 parent 4cb3667 commit ce59e9d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

OAuthiOS/Src/OAuthIORequest.m

+5-4
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ - (NSString *)buildHeaderWithDictionnary:(NSDictionary *)params
351351
}
352352
}
353353
}
354-
355354
return (query);
356355
}
357356

@@ -362,8 +361,9 @@ - (NSData *)buildPostParams:(id)params
362361
{
363362
if (_contentType != nil)
364363
postData = [[self formatFromContentType:params] dataUsingEncoding:NSUTF8StringEncoding];
365-
else
366-
postData = [[OAuthIORequest encodeURL:[self buildQueryWithDictionnary:params]] dataUsingEncoding:NSUTF8StringEncoding];
364+
else{
365+
postData = [[self buildQueryWithDictionnary:params] dataUsingEncoding:NSUTF8StringEncoding];
366+
}
367367
}
368368
else if ([params isKindOfClass:[NSString class]])
369369
postData = [params dataUsingEncoding:NSUTF8StringEncoding];
@@ -372,7 +372,8 @@ - (NSData *)buildPostParams:(id)params
372372

373373
NSString *contentLength = [NSString stringWithFormat:@"%lu", (unsigned long)[postData length]];
374374
[self addHeaderWithKey:@"Content-Length" andValue:contentLength];
375-
375+
376+
376377
return (postData);
377378
}
378379

0 commit comments

Comments
 (0)