File: packages/better-fetch/src/utils.ts:237-238
Fix: Replace the bare headers reference at lines 237–238 with options?.headers. The check should read: if (options?.headers?.has?.("content-type") && options.headers.get("content-type") === "application/x-www-form-urlencoded").
Also add a unit test that exercises this branch with a FormData body to prevent regression.
This issue was identified by an agentic audit tool. If this doesn't apply to your project, feel free to close it.
File: packages/better-fetch/src/utils.ts:237-238
Fix: Replace the bare headers reference at lines 237–238 with options?.headers. The check should read: if (options?.headers?.has?.("content-type") && options.headers.get("content-type") === "application/x-www-form-urlencoded").
Also add a unit test that exercises this branch with a FormData body to prevent regression.
This issue was identified by an agentic audit tool. If this doesn't apply to your project, feel free to close it.