ASIHTTPRequest - PostData but GET Method
Posted
by
RyanJM
on Stack Overflow
See other posts from Stack Overflow
or by RyanJM
Published on 2011-01-13T17:17:19Z
Indexed on
2011/01/13
17:53 UTC
Read the original article
Hit count: 386
iphone
|asihttprequest
Is there a way to see what request ASIHTTPRequest is making?
My code is:
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:url];
[request appendPostData:[data dataUsingEncoding:NSUTF8StringEncoding]];
[request setRequestMethod:@"GET"];
[request addRequestHeader:@"Content-Type" value:@"application/json"];
And I'm trying to duplicate:
curl -X GET "http://www.myurl.com/_api/my/url" -H "Content-Type: application/json" -d {"api_key":"my_special_api_key_123"}
The curl works fine, but I can't get the ASIHTTPRequest to work properly.
Any ideas?
© Stack Overflow or respective owner