The is my code
theDownloadConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
and it is calling these NSURLConnection delegate methods
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response;
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data;
- (void)connectionDidFinishLoading:(NSURLConnection *)connection;
But it is not calling
- (void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten
totalBytesWritten:(NSInteger)totalBytesWritten
totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite;
This method of NSURLConnection delegate calls when I do this
[NSURLConnection connectionWithRequest:request delegate:self];
I dont understand why this is happening?
didSendBodyData is only called when the request has a body containing message data like in POST request. You are most likely executing a GET.
From the apple docs: