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
xmlhttprequest
send
var XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; var FormData = require('form-data'); var data = new FormData(); data.append("foo", "\"baar\""); data.append("lorem", "\"ipsum\""); var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function() { if(this.readyState === 4) { console.log('******'); console.log(JSON.parse(this.responseText)); } }); xhr.open("POST", "http://httpbin.org/post"); xhr.setRequestHeader("Content-Type", "text/plain"); xhr.send(data);
Running above code snippet throws the following error :
TypeError [ERR_INVALID_ARG_TYPE]: The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type object
@driverdan Please include the support for FormData.
Thanks:)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
xmlhttprequest
throws an error while sending FormData object as an argument insend
method.Running above code snippet throws the following error :
@driverdan Please include the support for FormData.
Thanks:)
The text was updated successfully, but these errors were encountered: