Skip to content

'x-www-form-urlencoded' typo in openapi-fetch docu #2434

@JehhB

Description

@JehhB

openapi-fetch version

0.14.0

Description

There is a typo in the doc on how to serialize the body into URL Encoding, which may cause unwanted behavior when just copy-pasting from the docs

Reproduction

The current docs is like this

const { data, error } = await client.POST("/tokens", {
  body: {
    clientId: "someClientId",
    clientSecret: "someClientSecret",
  },
  headers: {
    "Content-Type": "application/x-www-form-encoded",
  },
});

Expected result

It should be like this

const { data, error } = await client.POST("/tokens", {
  body: {
    clientId: "someClientId",
    clientSecret: "someClientSecret",
  },
  headers: {
    "Content-Type": "application/x-www-form-urlencoded",
  },
});

Extra

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopenapi-fetchRelevant to the openapi-fetch library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions