Am Freitag, den 09.02.2018, 22:28 -0600 schrieb Peng Yu:
> Hi,
> 
> In the following example, `wget` should send an HTTP GET request to
> httpbin.org.
> 
> $ wget -qO- http://httpbin.org/get
> {
>   "args": {},
>   "headers": {
>     "Accept": "*/*",
>     "Accept-Encoding": "identity",
>     "Connection": "close",
>     "Host": "httpbin.org",
>     "User-Agent": "Wget/1.16.3 (darwin13.4.0)"
>   },
>   "origin": "165.91.48.95",
>   "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 wget so that
> I can see the raw requests as well as the raw responses?
> 
> GET /get HTTP/1.1
> Host:httpbin.org

Use 'wget -d -olog -qO- http://httpbin.org/get'.

Now you can find the request and response dumped in file 'log',
surrounded by lines like
---request begin---
etc.

You can extract these using 'sed' - I don't have the exact syntax at
hand, but you'll find it when you search the web.

Regards, Tim

-- 
Tim Ruehsen <[email protected]>

Reply via email to