Windows上使用curl命令

认识curl

有人解释成 command url
有人解释为 client url

用法

-X 请求方式
-H header数据
-d 附带数据

参考:https://www.ruanyifeng.com/blog/2019/09/curl-reference.html

Example

curl -X "POST" ^
  "http://127.0.0.1:18100/oauth/token" ^
  -H "accept: text/plain" ^
  -d ""

下载curl

https://curl.se/windows/

配置环境变量

path中加入C:\curl-7.84.0_6-win64-mingw\bin\

运行命令

curl www.baidu.com

拓展

微软有HttpRepl跟curl差不多一个意思

https://docs.microsoft.com/zh-cn/aspnet/core/web-api/http-repl/?view=aspnetcore-6.0&tabs=windows

posted @ 2022-07-22 11:28  喜爱糖葫芦  阅读(1756)  评论(0编辑  收藏  举报