0

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

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

Cœur
  • 37,241
  • 25
  • 195
  • 267
sDev
  • 1,463
  • 9
  • 17
  • Related: [502 HTTP Status Code](https://stackoverflow.com/questions/5011632/502-http-status-code) – Cœur Feb 22 '20 at 11:05

1 Answers1

1

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.

icodestuff
  • 340
  • 1
  • 11