Major revisions to httprequests.py