You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I make a post request using JavaScript the response returns an empty string. I can only seem to get the correct response via a cUrl request.
var url = "http://csvlint.io/package.json";
var xhr = new XMLHttpRequest();
xhr.open("POST", url);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
xhr.responseText
}
};
var data = "urls[]=http://theodi.github.io/hot-drinks/hot-drinks.csv";
xhr.send(data);
let res = xhr.responseText
console.log(res)
The text was updated successfully, but these errors were encountered:
When I make a post request using JavaScript the response returns an empty string. I can only seem to get the correct response via a cUrl request.
The text was updated successfully, but these errors were encountered: