MCPcopy
hub / github.com/scrapy/scrapy / initiate_request

Method initiate_request

scrapy/core/http2/stream.py:260–269  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

258 return headers
259
260 def initiate_request(self) -> None:
261 if self.check_request_url():
262 headers = self._get_request_headers()
263 self._protocol.conn.send_headers(self.stream_id, headers, end_stream=False)
264 self.metadata["request_sent"] = True
265 self.send_data()
266 else:
267 # Close this stream calling the response errback
268 # Note that we have not sent any headers
269 self.close(StreamCloseReason.INVALID_HOSTNAME)
270
271 def send_data(self) -> None:
272 """Called immediately after the headers are sent. Here we send all the

Callers 1

Calls 4

check_request_urlMethod · 0.95
_get_request_headersMethod · 0.95
send_dataMethod · 0.95
closeMethod · 0.95

Tested by

no test coverage detected