MBProgressHUD with NSURLConnection

后端 未结 3 1818
予麋鹿
予麋鹿 2020-12-15 14:26

I was trying to use MBProgressHUD with NSURLConnection.

The example in Demo project of MBProgressHUD reports:

- (IBAction)showURL:(id)sender {
    NS         


        
3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-15 15:05

    I solved the problem this way, switching from NSURLRequest to NSMutableURLRequestand setting the value none to the encoding (previously in gzip)

    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:anURL];
    [request addValue:@"" forHTTPHeaderField:@"Accept-Encoding"];
    

提交回复
热议问题