Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var uploadReq = new Request(LOGIN_URL, {
- method: 'post',
- headers: new Headers({
- 'Content-Type': 'application/json',
- }),
- body: JSON.stringify({
- username: this.state.username,
- password: this.state.password
- })
- });
- fetch(uploadReq)
- .then(this._requestHandler)
- .catch(function (err) {
- console.log('Fetch Error :-S', err);
- });
- Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 400. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement