when to use xmlhttprequest over fetch api code example Example: xml http request fetch fetch('my/url/').then(respone()=>{ console.log(response); }