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 creating a new XMLHttpRequest using our implementation, setting the method as "HEAD" will never let the request actually complete. The request seems to be perpetually in a "OPENED" state. I did a quick look at what I believe to be the relevant code and I did not see anything immediately jump out at me as an obvious blocker, though I didn't actually poke at anything.
Here is the code I used to attempt to use 'HEAD'
functionfetch(url,options={method: "GET"}){returnnewPromise((resolve,reject)=>{letreq=newXMLHttpRequest();req.onreadystatechange=function(){console.log(req.readyState);// Always "1"console.log(req.status);// Always "0"if(req.readyState===req.DONE){// Never trueif(req.status===200){console.log("Success");console.log("Content type:",req.getResponseHeader("content-type"));resolve(req.response);}else{console.log("Error",req.status,req.statusText);reject();}}};req.open(options.method,url);req.send();});}
The above code works when I set the method to a "GET" request and preforms as expected.
I have also double checked that the resource I want to retrieve is accessible using https://httpfy.io/http-request-tester-online-tools/.
The text was updated successfully, but these errors were encountered:
When creating a new XMLHttpRequest using our implementation, setting the method as "HEAD" will never let the request actually complete. The request seems to be perpetually in a "OPENED" state. I did a quick look at what I believe to be the relevant code and I did not see anything immediately jump out at me as an obvious blocker, though I didn't actually poke at anything.
Here is the code I used to attempt to use 'HEAD'
Call this function with
Example:
The above code works when I set the method to a "GET" request and preforms as expected.
I have also double checked that the resource I want to retrieve is accessible using https://httpfy.io/http-request-tester-online-tools/.
The text was updated successfully, but these errors were encountered: