Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What headers are automatically sent by wget?

I know that you can manually set some headers with the --header option, but I want to know what headers it sends without interaction.

like image 580
Bryan Agee Avatar asked Aug 01 '11 22:08

Bryan Agee


People also ask

How do I pass a header in wget?

wget allows you to send an HTTP request with custom HTTP headers. To supply custom HTTP headers, use "--header" option. You can use "--header" option as many time as you want in a single run. If you would like to permanently set the default HTTP request header you want to use with wget, you can use ~/.

What are headers in GET request?

Request headers contain more information about the resource to be fetched, or about the client requesting the resource. Response headers hold additional information about the response, like its location or about the server providing it.

Can headers be sent with GET request?

For example, to send a GET request with a custom header name, you can use the "X-Real-IP" header, which defines the client's IP address. For a load balancer service, "client" is the last remote host. Your load balancer intercepts traffic between the client and your server.


1 Answers

Using the -d (--debug) option I see it set:

---request begin--- GET / HTTP/1.0 User-Agent: Wget/1.12 (cygwin) Accept: */* Host: www.uml.edu Connection: Keep-Alive  ---request end--- 
like image 58
ribram Avatar answered Sep 19 '22 18:09

ribram