How to send multiple files with post request? (objective-c, iOS)

后端 未结 2 1589
醉话见心
醉话见心 2021-01-23 18:21

I want to sent post request, but i need to send multiple files, how to do this?

tnx

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-23 19:03

    Use one of the many resources on how to configure an NSMutableURLRequest for POSTing data. The Content-Type header should be "multipart/form-data", and each file will be concatenated in turn with an appropriate part header. RFC2388 is the relevant standard.

提交回复
热议问题