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.
Asked
Active
Viewed 641 times
1
1 Answers
0
You can use .setRequestHeader( 'referer', 'foo' ) or jQuery.Ajax();
Ahmet Can Güven
- 5,142
- 4
- 34
- 54
-
You cannot use `jQuery.post()` to control headers. You can use Ajax to set the headers. Half right – Juan Mendes Dec 13 '11 at 17:40
http://stackoverflow.com/questions/3073287/set-headers-with-jquery-ajax-and-jsonp – alessioalex Dec 13 '11 at 13:38