Create an object of NSMutableURLRequest, you can set the header field in this object. And then create an object of NSURLConnection with the parameter of NSMutableURLRequest and delelgate (its self).
The start method "start" is not necessary, in my case i got application crashed when i add start method. Don't forget set up a timer
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:10]];
after the start method.
The last thing is use the delegate methods of NSURLConnection, such as:
(void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
In these method, you can check the status of connection, received data and cancel the connectin in connectionDidFinishLoading.