Skip to content

422 response while accessing api #1564

Answered by Giotino
nishvs asked this question in Q&A
Discussion options

You must be logged in to vote

On my end this is working fine:

const got = require('got');

(async () => {
  const response = await got('https://postman-echo.com/post', {
    timeout: 5000,
    time: true,
    headers: { 'Content-Type': 'application/json' },
    body: '["12114704","12114883"]',
    method: 'POST',
  }).json();

  console.log(response);
})();

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by szmarczak
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1564 on December 22, 2020 14:40.