-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
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
Call not working with POST #18
Comments
I'm actually surprised to hear this. I was under the impression a content-type isn't required with a POST. Can you do some digging to find out the bare minimum change that would be required to fix this in the library? Maybe start with a plain XHR and a simple HTTP server first? Thanks! |
We could also steal the |
Hey Adam,
Thanks for getting back to me. I'll experiment with it more this weekend
and get back to you.
…-Paul
On Tue, Jan 17, 2017 at 3:00 PM, Adam Krebs ***@***.***> wrote:
We could also steal the content-type logic from Fetch
<https://github.com/github/fetch/blob/9240ef453a1ebc3670b8377f9deb771d684e7f68/fetch.js#L226-L235>.
It looks like all we need to do is set it to text/plain;charset=UTF-8.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#18 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAvk9jLrTZQPlnd06JKlQTLmff6wVX1iks5rTR3HgaJpZM4LkF_E>
.
|
It looks like with POST the code is just passing the data object to the XHR which isn't actually sending the data to the server. I'm able to workaround this by adding a contentType of "application/x-www-form-urlencoded" and code like the following to the file.
Am I doing something wrong here? data is a standard javascript object with key/value pairs.
The text was updated successfully, but these errors were encountered: