@aklinker1/zeta 1.2.4 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/internal/serialization.ts +2 -2
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -103,7 +103,7 @@ export function createAppClient<TApp extends App>(
|
|
|
103
103
|
inputs.body == null ? undefined : smartSerialize(inputs.body);
|
|
104
104
|
if (body) {
|
|
105
105
|
init.body = body.serialized;
|
|
106
|
-
init.headers["Content-Type"] = body.contentType;
|
|
106
|
+
if (body.contentType) init.headers["Content-Type"] = body.contentType;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function smartSerialize(value: unknown):
|
|
2
2
|
| {
|
|
3
|
-
contentType: string;
|
|
3
|
+
contentType: string | undefined;
|
|
4
4
|
serialized: BodyInit;
|
|
5
5
|
}
|
|
6
6
|
| undefined {
|
|
@@ -8,7 +8,7 @@ export function smartSerialize(value: unknown):
|
|
|
8
8
|
|
|
9
9
|
if (value instanceof FormData) {
|
|
10
10
|
return {
|
|
11
|
-
contentType:
|
|
11
|
+
contentType: undefined, // Let fetch set the content type with a boundary
|
|
12
12
|
serialized: value,
|
|
13
13
|
};
|
|
14
14
|
}
|