Type Alias LensHttpHandler

LensHttpHandler: (
    url: string,
    init: RequestInit,
    lensRequest: LensHttpRequest,
) => Promise<Response>

A handler function for customizing HTTP requests made by a Lens.

This function is called whenever a Lens makes an HTTP request. It allows you to modify the request or response, integrate custom HTTP libraries, add authentication, or log request details.

Type declaration

    • (
          url: string,
          init: RequestInit,
          lensRequest: LensHttpRequest,
      ): Promise<Response>
    • Parameters

      • url: string

        The URL for the HTTP request.

      • init: RequestInit

        The initial configuration for the HTTP request, following the Fetch API's RequestInit.

      • lensRequest: LensHttpRequest

        Additional context about the Lens-specific request.

      Returns Promise<Response>

      A Promise resolving to the HTTP response (Response).

MMNEPVFCICPMFPCPTTAAATR