Skip to content

Instantly share code, notes, and snippets.

@ppdouble
Last active April 14, 2023 09:55
Show Gist options
  • Save ppdouble/e8d674b05e8f8f465836904ffab24f2b to your computer and use it in GitHub Desktop.
Save ppdouble/e8d674b05e8f8f465836904ffab24f2b to your computer and use it in GitHub Desktop.
curl POST pass payload via JSON file
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