A few options:
- Create a structure, possibly JSON, that has the ID and the image data and set that as the body.
- Send the ID in the header and the image data in the body.
- Send the ID in the query string.
Question
I want to upload picture to aspx web page in the http post, the web page has two keys: image and id, i want to pass image to http post and user id. I saw many codes over stackoverflow, but i don't know how to use keys to pass the data. sorry for my bad English, thanks
Solution
A few options:
OTHER TIPS
You should use multipart/form-data. The most simple solution is to use AFNetworking: AFNetworking example how to post multipart request