0 with sub classing AFHTTPRequestOperationManager. Here is my code + ( NSAFNetwokingRequestManager * ) sharedClient { static NSAFNetwokingRequestManager * _ sharedClient = nil;. Request failed: internal server error ( 500) and Cocoa error 3840, Invalid value around character 0 responses AFNetworking. Error Domain= com. response Code= - 1011 " Request failed: internal server error ( 500) " UserInfo= 0x7fb129e4e930. 726e616cf 72 >, NSLocalizedDescription= Request failed: internal server error ( 500) }. allowInvalidCertificates = YES; manager. validatesDomainName = NO;. May be your server has not been published. So, with this you will not able to recieve internal server error.
I was trying to find the basics of this, here is the link. What it seems from your code is that the client side seems to have a issue. Why don' t you try using appendPartWithFileURL: name: fileName: mimeType: error:, and say if that. Error code, - 1011 means kCFURLErrorBadServerResponse ( from docs). Your web service ( API) giving you response for which your request/ response serializer of AFNetworking doesn' t know. Ask your developer team to de= - 1011 " Request failed: internal server error ( 500) " is server side issue. Please check with your server team to check because server is returning an error to your request. but when I upload the web api application to the server and sen POST request I get internal server error ( 500). NET" ; " X- Powered- By- Plesk" = PleskWin; } }, NSLocalizedDescription= Request failed: internal server error}. Change your code my for loop instead of your for loop, for( int i = 0 ; i < pictures. count; i+ + ) { UIImage * imag = [ pictures objectAtIndex: i] ; NSData * imageData = UIImagePNGRepresentation ( imag) ; [ formData. According to the elements you' ve added in your edited version, it seems like you' re not sending out JSON data in the format that is expected by the server.
The server is expecting a dictionary with blog_ guid and. HTTP 500 is the server error, I guess this error is caused by the invalid post param you have sent to the server, and some exception occurred in server side. Because I have tried your API in OC, I can get the correct JSON.