Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. var customHeaders= new Headers();
  2. customHeaders.append('Content-Type','application/json' )
  3. fetch(url, {
  4. method: 'POST',
  5. headers:customHeaders,
  6. mode: 'no-cors',
  7. responseType: 'text/html',
  8. body: JSON.stringify(myBody)
  9. }).then((response) => {
  10. console.log("response", response);
  11. }).catch(e => {
  12. console.log("error", e);
  13. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement