Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to send raw text body in POST request #472

Closed
therealhsk opened this issue Nov 28, 2022 · 1 comment
Closed

How to send raw text body in POST request #472

therealhsk opened this issue Nov 28, 2022 · 1 comment

Comments

@therealhsk
Copy link

Hello I am trying to post a request with raw text as body but it doesn't work
This is a snippet of the request. Need help

  const data: Response = await kyInstance.post("api/v1/debug/", {
    headers: {
      Authorization: `"MY_TOKEN_HERE`,
      "content-type": "text/plain;charset=utf-8",
    },
    body: "SELECT block_no,hash,tx_count from block order by id desc LIMIT 1",
  });
@rendomnet
Copy link

How did you resolved this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants