Skip to main content

Bug Tracker

Side navigation

#5512 closed enhancement (worksforme)

Opened November 14, 2009 10:04AM UTC

Closed November 14, 2009 10:01PM UTC

Last modified January 10, 2011 09:31AM UTC

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'}

});

Attachments (0)
Change History (2)

Changed November 14, 2009 10:01PM UTC by dmethvin comment:1

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.

Changed January 10, 2011 09:31AM UTC by samirpaitod@hotmail.com comment:2

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