Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fetch(nodeObj.RemoteUrl, {
- method: "post",
- credentials: "include",
- headers: {
- "RequestVerificationToken": document.querySelector("input[name='__RequestVerificationToken']").value,
- "Content-Type": "application/json"
- },
- body: JSON.stringify(data)
- })
- .then(function (response) {
- if (response.status !== 200) {
- console.log('Fetch ERROR: ' + response.status);
- }
- response.json().then(function (data) {
- console.log('Fetch GOOD');
- console.log(data);
- });
- })
- .catch(function (err) {
- console.log(`Error: ${err}`);
- });
- SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement