Hi all.
I'm moving my app from earlier version of AFNetworking to 2.0.
The POST seem to work (see it added to mysql) but it's returning an error.
very confusing.
Here is the Error:
ideas??
thanks
Ian
I'm moving my app from earlier version of AFNetworking to 2.0.
The POST seem to work (see it added to mysql) but it's returning an error.
very confusing.
Code:
NSURL *url = [NSURL URLWithString:PUTURL]; // PUTURL set to http://localion_of_PHP/
AFHTTPRequestOperationManager *httpClient = [[AFHTTPRequestOperationManager manager] initWithBaseURL:url];
// PUTPHP = PHPcode.php //
// httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[httpClient POST:PUTPHP parameters:paramass success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSString *responseStr = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
NSLog(@"Request Successful, response '%@'", responseStr);
sharedHSData.queuedItems=NO;
uploadError = NO;
[[NSNotificationCenter defaultCenter] postNotificationName:@"JSONCOMPLETED"
object:nil];
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
// if we fail add the score to a send Que and load the old //
NSLog(@"ID= %i [Alert Send HTTPClient Error]: %@",highScoreIdent, error.localizedDescription);
[self enableOKButton];
}]
Here is the Error:
Code:
ID= 0 [Alert Send HTTPClient Error]: The operation couldnt be completed. (Cocoa error 3840.)
ideas??
thanks
Ian
Last edited: