We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efb8e62 commit 1ac688cCopy full SHA for 1ac688c
src/client.ts
@@ -829,6 +829,14 @@ export class Finch {
829
(Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))
830
) {
831
return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable<Uint8Array>) };
832
+ } else if (
833
+ typeof body === 'object' &&
834
+ headers.values.get('content-type') === 'application/x-www-form-urlencoded'
835
+ ) {
836
+ return {
837
+ bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
838
+ body: this.stringifyQuery(body as Record<string, unknown>),
839
+ };
840
} else {
841
return this.#encoder({ body, headers });
842
}
0 commit comments