Skip to main content

SendRequestFunction

A function for sending HTTP requests.

It simplifies the process of sending HTTP requests. It is implemented by the crawling context and is used within request handlers to send additional HTTP requests to target URLs.

Index

Methods

Methods

__call__

  • __call__(url, *, method, headers): Coroutine[None, None, HttpResponse]
  • A call dunder method.


    Parameters

    • url: str

      The URL to send the request to.

    • optionalkeyword-onlymethod: HttpMethod = 'GET'

      The HTTP method to use.

    • optionalkeyword-onlyheaders: (HttpHeaders | dict[str, str]) | None = None

      The headers to include in the request.

    Returns Coroutine[None, None, HttpResponse]

Page Options