开发者

How to debug curl on IIS?

开发者 https://www.devze.com 2023-03-10 15:19 出处:网络
How to inspect CURL requests? My PHP scripts are hosted on IIS and I want to find some debugging tool for CURL.

How to inspect CURL requests?

My PHP scripts are hosted on IIS and I want to find some debugging tool for CURL. Could you suggest something in fiddler-style?

(Or maybe there is a way to use fiddler itself, I failed to do so be开发者_如何学Gocause if I make my CURL to tunnel through proxy 127.0.0.1 it makes CONNECT requests instead of GET)


wireshark is not working for HTTPS but for HTTP only.

Can you change your curl script to use HTTP ?


Use curl -v for verbose mode.

From 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.
0

精彩评论

暂无评论...
验证码 换一张
取 消