NSMutableURLRequest *objRequest =[[NSMutableURLRequest alloc]initWithURL:url1];
[objRequest setHTTPMethod:@"POST"];
[objRequest setHTTPBody:[NSData dataWithBytes:(__bridge const void *)(dict) length:[dict count]]];
NSURLConnection *connection = [[NSURLConnection alloc]initWithRequest:[NSURLRequest requestWithURL:url1]
delegate:self];
[connection start];
-(void) connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response{
length = [response expectedContentLength];
NSLog(@"%f",length);
}
i get length -1 in didReceiveResponse
method but the data of downloaded file is perfect ...pls tell me how can i get total length of file to be downloded..