Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var customHeaders= new Headers();
- customHeaders.append('Content-Type','application/json' )
- fetch(url, {
- method: 'POST',
- headers:customHeaders,
- mode: 'no-cors',
- responseType: 'text/html',
- body: JSON.stringify(myBody)
- }).then((response) => {
- console.log("response", response);
- }).catch(e => {
- console.log("error", e);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement