"Anfrage fehlgeschlagen: unzulässige content-type: text/html" mit AFNetworking 2.0

Ich versuche folgenden code, aber es gibt Fehler:

{    
 NSURL *url = [NSURL URLWithString:@"http://ielmo.xtreemhost.com/array.php"];    
 NSURLRequest *urlRequest =[[NSURLRequest alloc]initWithURL:url];    
 AFHTTPRequestOperation *requestOperation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest];    
 requestOperation.responseSerializer = [AFImageResponseSerializer serializer];    
 [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
        NSLog(@"Response: %@", responseObject);
        _imV.image = responseObject;

    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        NSLog(@"Image error: %@", error);
    }];
    [requestOperation start];
}

Bitte helfen, auf mich, auf "Request failed: unacceptable content-type: text/html" Fehler.

InformationsquelleAutor Vimal Raval | 2014-11-05
Schreibe einen Kommentar