Returns a dictionary with the headers of the response received from the proxy server to the CONNECT request sent to set the tunnel. If the CONNECT request was not sent, the method returns None.
(self)
| 1008 | response.close() |
| 1009 | |
| 1010 | def get_proxy_response_headers(self): |
| 1011 | """ |
| 1012 | Returns a dictionary with the headers of the response |
| 1013 | received from the proxy server to the CONNECT request |
| 1014 | sent to set the tunnel. |
| 1015 | |
| 1016 | If the CONNECT request was not sent, the method returns None. |
| 1017 | """ |
| 1018 | return ( |
| 1019 | _parse_header_lines(self._raw_proxy_headers) |
| 1020 | if self._raw_proxy_headers is not None |
| 1021 | else None |
| 1022 | ) |
| 1023 | |
| 1024 | def connect(self): |
| 1025 | """Connect to the host and port specified in __init__.""" |