moved http request logic into the http_request class