curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl + some proxy -- to generate the request/response headers

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 17 Jul 2018 00:41:18 +0200 (CEST)

On Sun, 15 Jul 2018, bruce wrote:

> curl -v -L 'foo'
>
> generates the response headers.
>
> As far as I can tell, using a "proxy" server should allow me to then view
> the har data for the url which would have the complete request/response
> headers for the target url.

Sure, or you can just use curl's --trace-ascii option and get a full trace of
the entire request response from curl's perspective.

> If you have a good site/pointers on how to accomplish this, let me know.

1. Install and run a HTTP proxy
2. Make sure the proxy logs all the details you want
3. point curl to use it by adding "-x myproxy:12345" to the command line
4. Watch your proxy's log

Note that this proxy approch will not work with HTTPS urls without some
additional hackery.

-- 
  / daniel.haxx.se
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2018-07-17