如何检查CURL请求?
我的PHP脚本托管在IIS上,我想为CURL找到一些调试工具。 你能用小提琴手来推荐一些东西吗?
(或者也许有一种方法可以使用fiddler本身,我没有这样做,因为如果我让我的CURL隧道通过代理127.0.0.1它会发出CONNECT请求而不是GET)
答案 0 :(得分:1)
wireshark不适用于HTTPS,仅适用于HTTP。
您可以更改curl脚本以使用HTTP吗?
答案 1 :(得分:1)
使用curl -v
进行详细模式。
来自man curl
-v/--verbose
Makes the fetching more verbose/talkative. Mostly useful for debugging. A line starting
with '>' means "header data" sent by curl, '<' means "header data" received by curl that
is hidden in normal cases, and a line starting with '*' means additional info provided by
curl.
Note that if you only want HTTP headers in the output, -i/--include might be the option
you're looking for.
If you think this option still doesn't give you enough details, consider using --trace or
--trace-ascii instead.
This option overrides previous uses of --trace-ascii or --trace.