def request(self, destination, endpoint, method, path, params, query, headers, body_producer): outgoing_requests_counter.inc(method) host = b"" port = 0 fragment = b"" parsed_URI = _URI(b"http", destination, host, port, path, params, query, fragment) # Set the connection pool key to be the destination. key = destination d = self._requestWithEndpoint(key, endpoint, method, parsed_URI, headers, body_producer, parsed_URI.originForm) def _cb(response): incoming_responses_counter.inc(method, response.code) return response def _eb(failure): incoming_responses_counter.inc(method, "ERR") return failure d.addCallbacks(_cb, _eb) return d
def request(self, destination, endpoint, method, path, params, query, headers, body_producer): host = b"" port = 0 fragment = b"" parsed_URI = _URI(b"http", destination, host, port, path, params, query, fragment) # Set the connection pool key to be the destination. key = destination return self._requestWithEndpoint(key, endpoint, method, parsed_URI, headers, body_producer, parsed_URI.originForm)