This will send a request to the server using the HTTP request method method and the request URI url. The provided url must be an absolute path to conform with RFC 2616 5.1.2 (unless connecting to an HTTP proxy server or using the OPTIONS or CONNECT methods).
HTTPConnection.request(method, url, body=None, headers={}, *, encode_chunked=False)
>>> import http.client
>>> host = "docs.python.org"
>>> conn = http.client.HTTPSConnection(host)
>>> conn.request("GET", "/3/", headers={"Host": host})
>>> response = conn.getresponse()
>>> print(response.status, response.reason)
200 OK