Show More
@@ -631,7 +631,7 class HTTPConnection(object): | |||||
631 | self.close() |
|
631 | self.close() | |
632 | self._connect(pheaders) |
|
632 | self._connect(pheaders) | |
633 |
|
633 | |||
634 |
def request(self, method, path, body=None, headers= |
|
634 | def request(self, method, path, body=None, headers=None, | |
635 | expect_continue=False): |
|
635 | expect_continue=False): | |
636 | """Send a request to the server. |
|
636 | """Send a request to the server. | |
637 |
|
637 | |||
@@ -642,6 +642,8 class HTTPConnection(object): | |||||
642 | available. Use the `getresponse()` method to retrieve the |
|
642 | available. Use the `getresponse()` method to retrieve the | |
643 | response. |
|
643 | response. | |
644 | """ |
|
644 | """ | |
|
645 | if headers is None: | |||
|
646 | headers = {} | |||
645 | method = _ensurebytes(method) |
|
647 | method = _ensurebytes(method) | |
646 | path = _ensurebytes(path) |
|
648 | path = _ensurebytes(path) | |
647 | if self.busy(): |
|
649 | if self.busy(): |
General Comments 0
You need to be logged in to leave comments.
Login now