curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: How to intercept curl to extract the raw requests and the raw responses?

From: Keefe Tang <keefe_at_pentagram.me>
Date: Fri, 23 Feb 2018 12:32:01 +0800

Yes. You can add the verbose flag -v in your command to see the
request and response to and from the server.

On Fri, Feb 9, 2018 at 11:30 PM, Peng Yu <pengyu.ut_at_gmail.com> wrote:
> Hi,
>
> In the following example, `curl` should send an HTTP GET request to httpbin.org.
>
> $ curl -g -sS http://httpbin.org/get
> {
> "args": {},
> "headers": {
> "Accept": "*/*",
> "Connection": "close",
> "Host": "httpbin.org",
> "User-Agent": "curl/7.57.0"
> },
> "origin": "165.91.87.88",
> "url": "http://httpbin.org/get"
> }
>
> The request probably starts with the following lines and I'd like to
> see them in the raw request. Is there a way to intercept curl so that
> I can see the raw requests as well as the raw responses?
>
> GET /get HTTP/1.1
> Host:httpbin.org
>
> PS. I tried the following HTTP proxy, but it can not show the raw request.
>
> https://github.com/abhinavsingh/proxy.py
>
> --
> Regards,
> Peng
> -----------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
> Etiquette: https://curl.haxx.se/mail/etiquette.html
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-02-23