问题
I'm working with an API which needs extra security information sent along with an HTTP request as meta-information in headers. Is it possible to set those in an XMLHttpRequest?
回答1:
Yes, see "The setRequestHeader() method" of the current XMLHttpRequest working draft of 6 December 2012.
来源:https://stackoverflow.com/questions/1180048/is-it-possible-to-send-custom-headers-with-an-xhr-ajax-request