Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 897
Andrey Fedorov Avatar asked Jul 24 '09 20:07

Andrey Fedorov


1 Answers

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

like image 83
Michael Morton Avatar answered Nov 15 '22 13:11

Michael Morton