Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. fetch("/post", {
  2. method: "POST",
  3. headers: {
  4. 'Content-Type': 'application/json'
  5. },
  6. body: JSON.stringify({data: "Text"})
  7. }).then(res => res.text())
  8. .then(res => console.log(res));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement