@hey-api/client-fetch
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -72,3 +72,3 @@ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited'; | ||
*/ | ||
headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined>; | ||
headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>; | ||
/** | ||
@@ -75,0 +75,0 @@ * The request method. |
{ | ||
"name": "@hey-api/client-fetch", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Typesafe Fetch API client for your @hey-api/openapi-ts types", |
@@ -59,2 +59,3 @@ import type { | ||
| undefined | ||
| unknown | ||
>; | ||
@@ -61,0 +62,0 @@ /** |
@@ -405,3 +405,8 @@ import type { Config } from './types'; | ||
} else if (value !== undefined) { | ||
mergedHeaders.set(key, value as string); | ||
// assume object headers are meant to be JSON stringified, i.e. their | ||
// content value in OpenAPI specification is 'application/json' | ||
mergedHeaders.set( | ||
key, | ||
typeof value === 'object' ? JSON.stringify(value) : (value as string), | ||
); | ||
} | ||
@@ -408,0 +413,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41670
944