Example of multipart/form-data post in Objective C
Use Objective C to implement the http post method and send data with Content-Type in multipart/form-data format. Support file and picture upload.
To get the mime type of the file under the IOS project, you need to add the MobileCoreServices.framework
in the Xcode. Build Phases -> Link Binary With Libraries
, add MobileCoreServices.framework
. Refer to Get a file mime type in Objective C.
Example
HttpPostMultipart.h
HttpPostMultipart.m