-
-
Save jrichardsz/a31839a35eaed6c3e1ca7a6c818a619f to your computer and use it in GitHub Desktop.
Posting a File and Json Data
This file contains hidden or 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
| # funciono : file + json | |
| curl -X POST -F "jsonPayload=@/c/Users/lala/Desktop/payload.json" -F "fileName=lala-2017.xlsx" -F "image=@/c/Users/lala/Desktop/input.txt" http://localhost:9090/upload | |
| # funciono : json + file | |
| curl -v POST \ | |
| -H 'Accept: application/json' \ | |
| -H 'Content-Type: multipart/form-data' \ | |
| --form-string 'data={"id": 42}' \ | |
| -F 'file=@/c/Users/lala/Desktop/input.txt' \ | |
| 'http://localhost:9090/upload' | |
| # funciono : json + file | |
| curl POST \ | |
| -H 'Accept: application/json' \ | |
| -H 'Content-Type: multipart/form-data' \ | |
| --form-string 'data={"id": 42}' \ | |
| -F 'file=@/c/Users/lala/Desktop/input.txt' \ | |
| 'http://localhost:9090/upload' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment