diff --git a/src/query.ts b/src/query.ts index 407680a..d008608 100644 --- a/src/query.ts +++ b/src/query.ts @@ -69,6 +69,7 @@ async function query( const response = await fetch(config?.proxyEndpoint ?? API_URL, { headers: { 'Content-Type': 'application/json; charset=utf-8', + ...config?.customHeader, }, method: 'POST', body: buildRequestBody(params), diff --git a/src/types.ts b/src/types.ts index 766229e..343557e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -37,4 +37,5 @@ export type ResponseParams = { export type Config = { proxyEndpoint?: string; + customHeader?: Record; };