I need to establish a connection to myPage.php, send it certain POST parameters and use a custom header. All this I need to be done synchronously and the content returned as an NSString, and only returned once I have gotten the content, so I don't have to deal with asynchronous requests and set up delegates and stuff.
All that I need in Objective-C.
Do you know a simple way? Thanks in advance!
开发者_如何学CEDIT: Thanks for your answers! But, just out of curiosity, is there a solution that doesn't require additional frameworks and libraries?
In case you cannot use ASIHttpRequest, just use a NSMutableURLRequest instead of NSURLRequest, like this.
Use ASIHttpRequest, makes things quite easy
精彩评论