How to remove HTTP specific headers in Javascript

前端 未结 4 976
情歌与酒
情歌与酒 2020-12-31 04:41

Is it possible to, before sending a http message, remove some specific http headers using javascript / XmlHttpRequest ?

I\'m using a proprietary browser, so there\'s

4条回答
  •  失恋的感觉
    2020-12-31 05:06

    Never done it, but in theory you could try:

    xhr.setRequestHeader('Authorization', null);
    

    There's also an unspecified removeRequestHeader() function in some implementations, you may want to give it a try as well.

提交回复
热议问题