(self, method, url, body=None, headers={})
Send a complete request to the server.
Send a complete request to the server.
Send a complete request to the server .
def request(self, method, url, body=None, headers={}):
        """Send a complete request to the server."""

        try:
            self._send_request(method, url, body, headers)
        except socket.error, v:
            # trap 'Broken pipe' if we're allowed to automatically reconnect
            if v[0] != 32 or not self.auto_open:
                raise
            # try one more time
            self._send_request(method, url, body, headers)
def request ( self , method , url , body = None , headers = { } ) : try : self . _send_request ( method , url , body , headers ) except socket . error , v : # trap 'Broken pipe' if we're allowed to automatically reconnect if v [ 0 ] != 32 or not self . auto_open : raise # try one more time self . _send_request ( method , url , body , headers )