Answers for "how to send a post by console chrome"

0

how to send a post by console chrome

fetch('https://www.hackthebox.eu/api/invite/generate', {
  method: 'POST',
  body: JSON.stringify({
    title: 'foo',
    body: 'bar',
    userId: 1
  }),
  headers: {
    'Content-type': 'application/json; charset=UTF-8'
  }
})
.then(res => res.json())
.then(console.log)
Posted by: Guest on March-24-2021

Browse Popular Code Answers by Language