We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be80828 commit 8193077Copy full SHA for 8193077
src/client.ts
@@ -694,6 +694,14 @@ export class OzAPI {
694
(Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))
695
) {
696
return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable<Uint8Array>) };
697
+ } else if (
698
+ typeof body === 'object' &&
699
+ headers.values.get('content-type') === 'application/x-www-form-urlencoded'
700
+ ) {
701
+ return {
702
+ bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
703
+ body: this.stringifyQuery(body as Record<string, unknown>),
704
+ };
705
} else {
706
return this.#encoder({ body, headers });
707
}
0 commit comments