How to set a custom HTTP header in curl

Question: I am trying to fetch a URL with curl command, but want to set a few custom header fields in the outgoing HTTP request. How can I use a custom HTTP header with curl? curl is a powerful command-line tool that can transfer data to and from a server over network. It supports a […]
Continue reading…

 

How to disable HTTP redirect in wget

Question: When I run wget to fetch a URL X which is redirected to another URL Y, wget, by default, goes fetch URL Y automatically. However, I would like to force wget to only fetch the original URL X without following the redirection. How can I stop wget from following a redirected URL? In the […]
Continue reading…