Created
June 10, 2018 23:33
-
-
Save goodviber/3e1ef9eb71139fdf2b30be2f427ef4a3 to your computer and use it in GitHub Desktop.
fetch with rack cors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch(url, | |
{ | |
method: 'PUT', | |
headers: {'Content-Type': 'application/json', | |
'Accept': 'application/json', | |
'X-Requested-With': 'XMLHttpRequest', | |
'X-CSRF-Token': token}, | |
body: JSON.stringify({ | |
"od" : { | |
"picker_id" : pickerId, | |
} | |
}), | |
credentials: 'same-origin' | |
}) | |
.then(this.checkStatus).....etc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment