用 curl 送檔案到 api 的方式

方式

  • 用 post request 的方式
    • curl -X PUT -d '{"id": 1}' https://reqbin.com/echo/post/json
  • 用 post file 的方式
    • curl -d @path/to/data.json https://reqbin.com/echo/post/json

Reference

Comments

2021-12-02