美文网首页pytorch
CURL 发送POST请求

CURL 发送POST请求

作者: 午字横 | 来源:发表于2022-11-14 13:55 被阅读0次

CURL 发送POST请求

curl -H "Content-Type: application/json" -X POST -d '{"user_id": "123", "coin":100, "success":1, "msg":"OK!" }' "http://192.168.0.1:8001/test"

参数 内容
-H 请求头
-d POST内容
-X 请求协议

简介
curl 是常用的命令行工具,用来请求 Web 服务器。它的名字就是客户端(client)的 URL 工具的意思。它的功能非常强大,命令行参数多达几十种。如果熟练的话,完全可以取代 Postman 这一类的图形界面工具。

curl -X POST -H "Content-Type: multipart/form-data" http://192.168.1.162:7789/predict -F "file=@C:\Users\liu\Desktop\imgs\kitten.jpg"

相关文章

网友评论

    本文标题:CURL 发送POST请求

    本文链接:https://www.haomeiwen.com/subject/wbedxdtx.html