Moved from httplib to http.client for py3 compatability