AFNetworking Fehler: "Erwartet status code in (200-299), got 404"

Mein code:

NSURL *url = [NSURL URLWithString:@"http:testurl.com"];
AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:url];

NSString *email = @"[email protected]";
NSString *password = @"test";

NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
                        email, @"email",
                        password, @"password",
                        nil];

[httpClient postPath:@"/myobject" parameters:params success:^(AFHTTPRequestOperation *operation, id responseObject) {
    NSString *responseStr = [[NSString alloc] initWithData:responseObject encoding:AFJSONParameterEncoding];
    NSLog(@"Request Successful, response '%@'", responseStr);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
    NSLog(@"[HTTPClient Error]: %@", error.localizedDescription);
}];

Obwohl ich weiß, dass die server voraussichtlich einen BEITRAG habe ich versucht zu BEKOMMEN und zu und erhalten die gleichen Fehler. Ich habe auch überprüft die URL 100 mal. Irgendwelche Ideen auf, was den Fehler verursacht?

Dank!!

InformationsquelleAutor markw | 2013-02-23

Schreibe einen Kommentar