Suppose you do
const xhr = new XMLHttpRequest();
xhr.open('GET', '/test');
xhr.send();
The question is, is there a way, to extract url and method from that xhr
object?
For example, when the response is received you can get the url: xhr.responseURL
. But can I get the method too (there is no xhr.responseMethod
)
In my case I cannot patch the XMLHttpRequest
prototype and store these values, I have to deal with the instance only. Any suggestions?