Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#5512 closed enhancement (worksforme)

add header option for sending custom http header

Reported by: quaff Owned by:
Priority: critical Milestone: 1.4
Component: ajax Version: 1.3.2
Keywords: header setRequestHeader Cc:
Blocked by: Blocking:


$.ajax({ 'url':'/test', header:{'customHeaderName':'customHeaderValue'} });

Change History (2)

comment:1 Changed 13 years ago by dmethvin

Resolution: worksforme
Status: newclosed

That is the purpose of the beforeSend function, it passes you the xhr object and you can call setRequestHeader on it.

comment:2 Changed 12 years ago by [email protected]

Please add method to jquery library to be able to add custom http header for protection against CSRF.

Note: See TracTickets for help on using tickets.