We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d51db3d commit ca89b18Copy full SHA for ca89b18
1 file changed
src/client.ts
@@ -750,6 +750,14 @@ export class SentDm {
750
(Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))
751
) {
752
return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable<Uint8Array>) };
753
+ } else if (
754
+ typeof body === 'object' &&
755
+ headers.values.get('content-type') === 'application/x-www-form-urlencoded'
756
+ ) {
757
+ return {
758
+ bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
759
+ body: this.stringifyQuery(body as Record<string, unknown>),
760
+ };
761
} else {
762
return this.#encoder({ body, headers });
763
}
0 commit comments