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

后端 未结 7 1462
无人共我
无人共我 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 11:24

    You can use the --form argument with an explicitly

    curl -H "Content-Type: multipart/related" \
      --form "data=@example.jpg;type=image/jpeg" http://localhost:3000/test
    
    0 讨论(0)
提交回复
热议问题