Skip to content
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

send(undefined) and send("") fails. #20

Open
rjamesnw opened this issue Nov 5, 2013 · 0 comments
Open

send(undefined) and send("") fails. #20

rjamesnw opened this issue Nov 5, 2013 · 0 comments

Comments

@rjamesnw
Copy link

rjamesnw commented Nov 5, 2013

I'm loading test JSON data from a text file on a local web server (using IE) and thus don't need to send anything. Normally I send undefined or "", and it works using the native xmlHttpRequest object, but not with your wrapper.

According to the specification I found (http://xhr.spec.whatwg.org/#the-send()-method): "If data is null, do not include a request entity body and go to the next step." However, the data is not null when it's undefined or empty, and thus most browsers I've tested will send an empty request in these cases, AND return the response (or file in this case).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant