Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 10 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:

Description

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

Change History (2)

comment:1 Changed 11 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 10 years ago by samirpaitod@…

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.