We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7860190 commit cc9982cCopy full SHA for cc9982c
1 file changed
src/client.ts
@@ -854,6 +854,14 @@ export class Kernel {
854
(Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))
855
) {
856
return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable<Uint8Array>) };
857
+ } else if (
858
+ typeof body === 'object' &&
859
+ headers.values.get('content-type') === 'application/x-www-form-urlencoded'
860
+ ) {
861
+ return {
862
+ bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
863
+ body: this.stringifyQuery(body as Record<string, unknown>),
864
+ };
865
} else {
866
return this.#encoder({ body, headers });
867
}
0 commit comments