简体   繁体   中英

How to debug curl on IIS?

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 because 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM