Andrey Fedorov
Andrey Fedorov

Reputation: 9669

Is it possible to send custom headers with an XHR ("Ajax" request)?

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?

Upvotes: 10

Views: 5733

Answers (1)

Mara Morton
Mara Morton

Reputation: 4460

Yes, see "The setRequestHeader() method" of the current XMLHttpRequest working draft of 6 December 2012.

Upvotes: 15

Related Questions