node-XMLHttpRequest icon indicating copy to clipboard operation
node-XMLHttpRequest copied to clipboard

A request header's default value can now be overwritten.

Open ghost opened this issue 9 years ago • 0 comments

The default value of */* for the Accept header can cause undesirable behavior. For example, I am dealing with an API that can serve XML or JSON, but I cannot get it to return JSON due to the default value being first in the list. This change makes it so that if the setRequestHeader is called on a header that is currently set to its default value, it will overwrite the value instead of appending to it.

ghost avatar Dec 22 '15 03:12 ghost