Created
August 21, 2015 20:54
-
-
Save innerverse/bbe397abac9749afcc97 to your computer and use it in GitHub Desktop.
Multipart curl example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Auth | |
curl -i -H "Content-Type: application/json" -X POST -d @/home/seth/cred.json http://localhost:8080/api/v1/user/authenticate | |
# Pass auth token, json field, and binary file via REST | |
curl -i -H "Content-Type: multipart/form-data" -H "session-id: e862a33febfc77d0eff87d35d7fb66314580a2d2" -X POST http://localhost:8080/api/v1/send-error-report -F "errorReport=@/home/seth/pr.json;type=application/json" -F "file=@/home/seth/pr.zip;type=application/octet-stream" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment