info("httpheaders")

The info(“httpheaders”) function returns a dictionary with information about a just completed HTTP download.


Description

This function returns a dictionary with information about a just completed HTTP download. To do this, the first statement in the urltask( completion code should be the urltaskstatus function. Then at a later point, the code can use the info(“httpheaders”) function to get a dictionary that contains all of the available information about the download. The exact dictionary entries will vary depending on the server queried, but here is a typical example.

	Server=Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.8l PHP/5.3.3
	Connection=Keep-Alive
	Etag="4e6c5-b60f-4e4f0aea25200"
	Keep-Alive=timeout=15, max=499
	Content-Type=text/html
	X-Frame-Options=SameOrigin
	Expires=Thu, 09 Oct 2014 08:53:21 GMT
	Cache-Control=max-age=60
	Accept-Ranges=bytes
	Last-Modified=Tue, 27 Aug 2013 16:51:20 GMT
	Date=Thu, 09 Oct 2014 08:52:21 GMT
	MS-Author-Via=DAV
	Content-Length=46607

If you only need the header information and not the data itself, set the METHOD to HEAD. For example you might want to do this to verify that a resource exists without taking the time to download the whole thing.


See Also


History

VersionStatusNotes
10.0NewNew in this version.