With javascript you can do it with xmlhttp.open, what other ways can do this?
Asked
Active
Viewed 255 times
0
-
Possibly related: http://stackoverflow.com/questions/4521149/http-request-from-javascript-using-raw-message-including-headers http://stackoverflow.com/questions/4463624/how-can-i-send-raw-data-in-an-http-get-request – Rob Hruska May 29 '13 at 10:13
1 Answers
-1
If you don't want a POST method, with jQuery :
$.get('test.html',{foo: 'bar'}, function(data) {
alert('Load was performed.');
});

Thierry
- 5,133
- 3
- 25
- 30
-
maybe insert the data object, to serve the needs: `$.get('test.html',{foo: 'bar'}, function(data) {` – Imperative May 29 '13 at 10:20
-
but won't that use get paramaters in the URL request rather than send the data in the body like POST would? – user1166981 May 29 '13 at 10:21
-
Thierry, as I understand, this sends the data in format urlpage.php?data. not urlpage.php alone (like a POST request would which uses the body).. – user1166981 May 29 '13 at 10:28