sDev
sDev

Reputation: 1471

Getting error in uploading image with AFNetworking in Objective-C

Getting error in uploading image with AFNetworking in Objective-C:

Error Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: bad gateway (502)

Upvotes: 0

Views: 212

Answers (1)

icodestuff
icodestuff

Reputation: 350

Take a look at https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

A 502 error indicates a problem with the server you're trying to upload to, and in particular, with one of its upstream servers. If you're not getting this error on other clients trying to upload to the same URL (eg, a web browser), in my experience the culprit is the gateway server and upstream server not dealing with headers the same way, but your mileage may vary.

Upvotes: 1

Related Questions