回声卷曲请求标头&身体没有发送呢? [英] Echo curl request header & body without sending it?

查看:149
本文介绍了回声卷曲请求标头&身体没有发送呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用curl命令行工具,是否可以 echo ,打印或查看请求,而不发送它?像 -n 选项的排序?我想看到请求头&身体,以及包括的任何东西。除了标题&身体?

With the curl command line tool, is it possible to echo, print, or view the request, and not send it? Sort of like a -n option? I would like to see the request header & body, and anything else that's included. Is there anything else that's sent besides header & body?

推荐答案

让我第二个建议使用'nc'(netcat)去看看所有的细节,

Let me second the suggestion to use 'nc' (netcat) to get to see all the details without sending anything offsite to anywhere.

但您也可以通过使用 - trace - trace-ascii 命令可以转储所有传入和传出的数据和请求进行检查。

But you can also get all the details for any curl command line request by using the --trace or --trace-ascii commands that can dump all incoming and outgoing data and requests for inspection.

与nc相比,它们可以显示协议详细信息,即使对于HTTPS操作和真正的命令行等也有额外的好处。

These options have the additional benefit in comparison to 'nc' that they can show the protocol details even for HTTPS operations and with "real" command lines etc.

这篇关于回声卷曲请求标头&身体没有发送呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆