Wednesday, May 1, 2013

NSURLConnection currentRequest example ios


currentRequest

Returns the current connection request.
- (NSURLRequest *)currentRequest
Return Value of [NSURLConnection currentRequest]
Returns the current—possibly modified—connection request.
Discussion of [NSURLConnection currentRequest]
As the connection performs the load, the request may change as a result of protocol canonicalization or due to following redirects.
This method is be used to retrieve the current value.
Example of [NSURLConnection currentRequest]
- (void)connectionDidFinishLoading:(NSURLConnection *)connection 
{
   NSLog(@"%@",[connection currentRequest]);
}
Example of [NSURLConnection currentRequest]
- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
NSURL *myURL = [[connection currentRequest] URL];