Max payload size for http request and response, iphone

后端 未结 1 815
再見小時候
再見小時候 2020-12-22 01:35

Is there any limits for the payload size of an http request in iphone? I\'m requiring to upload images to the server, so will be sending NSData of the image as an http reque

相关标签:
1条回答
  • 2020-12-22 02:24

    There is no limit that I know of as far as size of the upload.

    The limit you will run into is that iPhone apps can only use so much bandwidth when not on wifi (e.g. if you are on the cellular network).

    If on edge or 3g, you can only move data at about 1 mb/min, otherwise Apple will reject the app. I have generally heard this limit being imposed on downloads, but I suspect uploads would have the same limit, and you will also run into this as you pull down images.

    Rather than write this yourself, there is a great lib out there that handles http requests with attachments (no I am not the author), and also keeps track of all bandwidth use and can throttle is automatically if you are on the cellular network:

    http://allseeing-i.com/ASIHTTPRequest/

    0 讨论(0)
提交回复
热议问题