I am trying to download a JSON with NSURLConnection, but unless I force the app to pause some seconds the data I get isn't complete. It is always around 2600 bytes and my response should be around 70000.
Any clue why is this happening?
Thank You
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
_responseData = [[NSMutableData alloc] init];
//sleep(10);
}
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
{
[_responseData appendData:data];
[self getDataJSON: _responseData];
}