diff --git a/libs/client/package.json b/libs/client/package.json index a0c6290..a9903f1 100644 --- a/libs/client/package.json +++ b/libs/client/package.json @@ -1,7 +1,7 @@ { "name": "@fal-ai/serverless-client", "description": "The fal serverless JS/TS client", - "version": "0.14.2", + "version": "0.14.3", "license": "MIT", "repository": { "type": "git", diff --git a/libs/client/src/middleware.ts b/libs/client/src/middleware.ts index bc916f5..127c2fb 100644 --- a/libs/client/src/middleware.ts +++ b/libs/client/src/middleware.ts @@ -3,12 +3,13 @@ * * **Note:** This is a simplified version of the `RequestConfig` type from the * `fetch` API. It contains only the properties that are relevant for the - * `fal-serverless` client. It also works around the fact that the `fetch` API - * `Request` does not support mutability, its clone method has critical limitations + * fal client. It also works around the fact that the `fetch` API `Request` + * does not support mutability, its clone method has critical limitations * to our use case. */ export type RequestConfig = { url: string; + method: string; headers?: Record; }; diff --git a/libs/client/src/request.ts b/libs/client/src/request.ts index 4de3ddb..4e42c03 100644 --- a/libs/client/src/request.ts +++ b/libs/client/src/request.ts @@ -30,6 +30,7 @@ export async function dispatchRequest( const { url, headers } = await requestMiddleware({ url: targetUrl, + method: method.toUpperCase(), }); const authHeader = credentials ? { Authorization: `Key ${credentials}` } : {}; const requestHeaders = {