Class PwnedPasswords

Hierarchy

  • APIClient
    • PwnedPasswords

Constructors

Properties

baseURL: URL

The base URL for all API requests. Must be defined in subclasses.

Methods

  • This method is called after the response is received. It can be used to process or inspect the response before returning it.

    Parameters

    • response: Response

      The response object that was received.

    Returns Promise<Response>

    A promise that resolves to the (possibly processed) response.

  • This method is called before the request is sent. It can be used to modify the request before it is sent (e.g., adding headers).

    Parameters

    • request: Request<unknown, CfProperties<unknown>>

      The request object that will be sent.

    Returns Promise<Request<unknown, CfProperties<unknown>>>

    A promise that resolves to the (possibly modified) request.

  • Sends a DELETE request to the specified path.

    Parameters

    • path: string

      The path to send the request to, relative to baseURL.

    • Optionalinit: Omit<RequestInit<CfProperties<unknown>>, "method">

      Optional request options, excluding the HTTP method.

    Returns Promise<Response>

    A promise that resolves to the response from the request.

  • Sends a fetch request to the specified path, using the provided RequestInit options.

    Parameters

    • path: string

      The path to send the request to, relative to baseURL.

    • Optionalinit: RequestInit<CfProperties<unknown>>

      Optional request options.

    Returns Promise<Response>

    A promise that resolves to the response from the request.

  • Sends a GET request to the specified path.

    Parameters

    • path: string

      The path to send the request to, relative to baseURL.

    • Optionalinit: Omit<RequestInit<CfProperties<unknown>>, "method">

      Optional request options, excluding the HTTP method.

    Returns Promise<Response>

    A promise that resolves to the response from the request.

  • Sends a PATCH request to the specified path.

    Parameters

    • path: string

      The path to send the request to, relative to baseURL.

    • Optionalinit: Omit<RequestInit<CfProperties<unknown>>, "method">

      Optional request options, excluding the HTTP method.

    Returns Promise<Response>

    A promise that resolves to the response from the request.

  • Sends a POST request to the specified path.

    Parameters

    • path: string

      The path to send the request to, relative to baseURL.

    • Optionalinit: Omit<RequestInit<CfProperties<unknown>>, "method">

      Optional request options, excluding the HTTP method.

    Returns Promise<Response>

    A promise that resolves to the response from the request.

  • Sends a PUT request to the specified path.

    Parameters

    • path: string

      The path to send the request to, relative to baseURL.

    • Optionalinit: Omit<RequestInit<CfProperties<unknown>>, "method">

      Optional request options, excluding the HTTP method.

    Returns Promise<Response>

    A promise that resolves to the response from the request.