1

Is there a way to post data with javascript, but set the attributes such as content type, referrer, user agent, etc. From what I can tell, the only data I can post is plain variables instead of application/x-www-form-urlencoded data.

Naftali
  • 144,921
  • 39
  • 244
  • 303
John
  • 5,942
  • 3
  • 42
  • 79
  • 1
    There are similar questions on SO (duplicates): http://stackoverflow.com/questions/3759575/custom-headers-with-ajax-type-jsnop-or-json
    http://stackoverflow.com/questions/3073287/set-headers-with-jquery-ajax-and-jsonp
    – alessioalex Dec 13 '11 at 13:38

1 Answers1

0

You can use .setRequestHeader( 'referer', 'foo' ) or jQuery.Ajax();

Ahmet Can Güven
  • 5,392
  • 4
  • 38
  • 59