Vote count:
0
I have tried a lot to post json data with an image, to a REST API using curl- command line interface, but could not succeed in it. The request I tried was:
curl -X POST -H "X-Parse-Application-Id: sdgfsdfgsdfgsdfgsdfgsdg" -H "Content-Type: multipart/form-data" -H "X-Parse-REST-API-Key: sdfgsdfgsdfgsdfgsdfgsdfgsdfgsdfgsdg" -d '{"username":"aaaaaaaa","email":"aaaaaaaaa@gmail.com","password":"123"}' --data-binary "image:@/home/user/Pictures/gravatar.jpg" http://ift.tt/1EbY649
I also tried this:
curl -X POST -H "X-Parse-Application-Id: sdgfsdfgsdfgsdfgsdfgsdg" -H "X-Parse-REST-API-Key: sdfgsdfgsdfgsdfgsdfgsdfgsdfgsdfgsdg" -d '{"username":"aaaaaaaa","email":"aaaaaaaaa@gmail.com","password":"123"}' --data-binary "image:@/home/user/Pictures/gravatar.jpg" http://ift.tt/1EbY649
Please someone help me.
asked 1 min ago
How to post json data and image(file) using curl REST API using command line?
Aucun commentaire:
Enregistrer un commentaire