在linux

  • &需要用&转义

GET:

curl  http://119.29.151.177/account/password/find?channel=2201\&account=abc

POST:

curl -X POST http://demo.wiliamy.com/account/password/find?channel=2201\&account=abc

使用POST提交JSON数据

curl -l -H "Content-Type:application/json" -H "Accept:application/json" -X POST -d "{ \"studentId\":661, \"courseIds\":[3,19,27], \"status\":\"STARTED\"}" http://10.0.00.00:8080/search/status

在windos power shell

-&需要用双引号括起来

GET:

curl  http://demo.com/account/password/find

POST:

curl  http://demo.com/account/password/find?channel=2201"&"account=abc  -Method post

我们可以用get-help 看帮助信息:

 get-help Invoke-WebRequest
 名称
    Invoke-WebRequest

语法
    Invoke-WebRequest [-Uri] <uri>  [<CommonParameters>]


别名
    iwr
    wget
    curl


备注
    Get-Help 在此计算机上找不到该 cmdlet 的帮助文件。它仅显示部分帮助。
        -- 若要下载并安装包含此 cmdlet 的模块的帮助文件,请使用 Update-Help。
        -- 若要联机查看此 cmdlet 的帮助主题,请键入: "Get-Help Invoke-WebRequest -Online" 或
           转到 http://go.microsoft.com/fwlink/?LinkID=217035。

格式化输出

curl后面加 |python -m json.tool

GitHub 加速计划 / li / linux-dash
10
2
下载
A beautiful web dashboard for Linux
最近提交(Master分支:16 天前 )
186a802e added ecosystem file for PM2 5 年前
5def40a3 Add host customization support for the NodeJS version 5 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐