在linux和Windows使用curl,使用POST提交JSON数据
2017-05-08 15:33
836 查看
在linux
&需要用\&转义GET:
curl http://119.29.151.177/account/password/find?channel=2201\&account=abc[/code]POST:
curl -X POST http://demo.wiliamy.com/account/password/find?channel=2201\&account=abc[/code]使用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[/code]在windos power shell
-&需要用双引号括起来GET:
curl http://demo.com/account/password/find[/code]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。[/code]
相关文章推荐
- Linux终端使用curl来post数据,数据格式为json
- Android学习之Http使用Post方式进行数据提交(普通数据和Json数据)
- CURL模拟POST提交JSON数据
- Linux下使用CURL模拟用户提交post表单
- linux下用shell来 CURL POST JSON 数据遇到的问题
- 使用Curl、socket、file_get_contents三种方法POST提交数据
- PHP发送POST请求的三种方式 分别使用curl file_get_content fsocket 来实现post提交数据
- php中使用Curl、socket、file_get_contents三种方法POST提交数据
- HttpURLconnection使用POST方式提交JSON数据给服务器
- PHP中CURL使用POST提交XML数据
- php使用CURL模拟GET与POST向微信接口提交及获取数据的方法
- 解析PHP 使用curl提交json格式数据
- 使用Volley提交Json数据post
- PHP 使用 curl 提交 json 格式数据
- php中使用Curl、socket、file_get_contents三种方法POST提交数据
- 使用Curl、socket、file_get_contents三种方法POST提交数据
- 使用Curl、socket、file_get_contents三种方法POST提交数据
- 通过Curl、socket、file_get_contents三种方法使用POST提交数据
- PHP 使用 curl 提交 json 格式数据(已实践 可行)
- 【C#】jQuery使用 $.post提交json数据