Last active
April 14, 2023 09:55
-
-
Save ppdouble/e8d674b05e8f8f465836904ffab24f2b to your computer and use it in GitHub Desktop.
curl POST pass payload via JSON file
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
curl -vX POST 127.0.0.1:8888/my/api?para1=123 -H 'Content-Type: application/json' -d @/home/path/to/mydata.json | |
# mydata.json | |
# { | |
# "para": "m", | |
# "data": { | |
# "d1": "111", | |
# "d2": "222" | |
# } | |
# } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://stackoverflow.com/questions/18611903/how-to-pass-payload-via-json-file-for-curl
https://reqbin.com/req/c-dwjszac0/curl-post-json-example