diff --git a/templates/base/http-clients/ky-http-client.ejs b/templates/base/http-clients/ky-http-client.ejs index 6c6a8c11..87d73093 100644 --- a/templates/base/http-clients/ky-http-client.ejs +++ b/templates/base/http-clients/ky-http-client.ejs @@ -85,7 +85,7 @@ export class HttpClient { query, format, body, - ...requestParams + ...options <% if (config.unwrapResponseData) { %> }: FullRequestParams): Promise => { <% } else { %> @@ -100,9 +100,9 @@ export class HttpClient { } const request = this.ky(path, { - ...requestParams, + ...options, headers: { - ...(requestParams.headers || {}), + ...(options.headers || {}), ...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}), }, searchParams: query,