A simple class to send HEAD or GET request to an http page
Simply create an HTTPRequest object using url string. Url string can be formatted in all valid standards such as http://example.com
or http://www.example.com
or www.example.com
. https protocol is accepted by constructor. AN exception will be raised if the string does not meet the needed standards.
Public methods:
getHeader()
which returns a dictionary with Field Name as key and value as, of course, value.get(method)
which returns a string with everything the page has sent. method should be a string.