HTTPCLIENT PACKAGE TUTORIAL
Headers
HTTPClient provides functions for inspecting headers and manually passing headers to HTTP servers.
Connect to a HTTP server whose headers you wish to inspect.
URLFetch["www.wolfram.com", "Headers"]
| Out[1]= | ![]() |
Occasionally, it might be useful to manually pass headers to an HTTP server. This can be done using the
option.
url = "http://exampledata.wolfram.com/headers.php";
URLFetch[url, "Headers"->{"My-Header1"->"value1", "My-Header2"->"value2"}]
| Out[3]= | ![]() |
You can also override headers sent by HTTPClient. Here the default headers sent to the server are examined.
url = "http://exampledata.wolfram.com/headers.php";
URLFetch[url]
| Out[5]= | ![]() |
The headers can be overridden manually.
url = "http://exampledata.wolfram.com/headers.php";
URLFetch[url, "Headers"->{"User-Agent"->"New Header Value"}]
| Out[7]= | ![]() |




