title: Modify jQuery Request Headers before send
body: <p>I have a single page js app and I'm sending custom headers to my server containing logs, but i need to control the size of those headers because my server won't accept requests larger then 8k. </p>
  
  <p>My solution thus far was to intercept all outgoing ajax request from my application.</p>
  
  <p>I'm using <a href="http://docs.jquery.com/Ajax_Events" rel="nofollow">jQuery Global Ajax Events</a>, particularly <code>ajaxSend</code> to intercept all requests. I cannot use <code>beforeSend</code> because that is a local event.</p>
  
  <p>I can't seem to access the request headers in the callback. I need to read all request's header and cut down the logs header if it's too large.</p>