We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While using fetch from isomorphic-fetch it can't send the request in application/json type, it keeps sending plain/text.
After using fetch from node-fetch plugin it works!!
The text was updated successfully, but these errors were encountered:
When calling ‘fetch()’, for the 2nd parameter do you define a ‘headers’ key:value?
Sorry, something went wrong.
Yes like the following: fetch('http://example.domain/api/v0.2/login/', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ userName: this.state.usernameOrEmail, password: this.state.password, }), cridentials: 'include', mode: 'no-cors', })
fetch('http://example.domain/api/v0.2/login/', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ userName: this.state.usernameOrEmail, password: this.state.password, }), cridentials: 'include', mode: 'no-cors', })
Do you get back and OPTIONS request?
Also, this might be a CORs issue.
JakeChampion/fetch#143 (comment)
No branches or pull requests
While using fetch from isomorphic-fetch it can't send the request in application/json type, it keeps sending plain/text.
After using fetch from node-fetch plugin it works!!
The text was updated successfully, but these errors were encountered: