UNPKG

@snap/camera-kit

Version:
42 lines (22 loc) 875 B
[**CameraKit Web SDK v1.13.0**](../README.md) *** [CameraKit Web SDK](../globals.md) / LensHttpHandler # Type Alias: LensHttpHandler() > **LensHttpHandler**: (`url`, `init`, `lensRequest`) => `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. ## 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`](../interfaces/LensHttpRequest.md) Additional context about the Lens-specific request. ## Returns `Promise`\<`Response`\> A Promise resolving to the HTTP response (`Response`).