linux post请求
时间: 2023-10-12 09:00:39 浏览: 93
post请求
Linux中的POST请求可以使用curl命令实现。对于JSON格式的POST请求,可以使用以下命令:
```
curl -H "Content-Type:application/json" -X POST --data '{"id":1,"jsonrpc":"2.0"}' http://ip:8080/aaa
```
该命令中,`-H`参数指定了请求头中的Content-Type为application/json,`-X POST`参数指定了请求方法为POST,`--data`参数指定了请求的数据为JSON格式的字符串,`http://ip:8080/aaa`是请求的URL。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [linux执行post请求和get请求](https://blog.csdn.net/weixin_44432789/article/details/126889512)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Linux下实现Post方式](https://blog.csdn.net/huangfeng1007/article/details/78665828)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文