How can I rewrite this CURL multipart/form-data request without using -F?

后端 未结 7 1510
无人共我
无人共我 2020-12-07 10:29

How can I rewrite the following CURL command, so that it doesn\'t use the -F option, but still generates the exact same HTTP request? i.e. so that it passes th

7条回答
  •  余生分开走
    2020-12-07 10:58

    This is for multipart/form-data request method. for uploading a file add --form filename="@path/image.jpg;type=image/jpeg"

    curl --form key="value" --form key="value" http://localhost:3000/test

提交回复
热议问题