Skip to content

Undici - TypeError: Request with GET/HEAD method cannot have body. #4013

@Maxttier

Description

@Maxttier

Bug Description

It worked as is prior but now say something about undici

I understand what get hasn't body, but why it work but now appeared that undici?

TypeError: Request with GET/HEAD method cannot have body.
at new Request (node:internal/deps/undici/undici:6321:17)

 const request = new Request(url, {
      headers: headers,
      method,
      body: new URLSearchParams(body).toString(),
    })

But I want Request to be https://developer.mozilla.org/en-US/docs/Web/API/Request

Reproducible By

Expected Behavior

Logs & Screenshots

Environment

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions