0

With javascript you can do it with xmlhttp.open, what other ways can do this?

user1166981
  • 1,668
  • 7
  • 25
  • 40
  • 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 Answers1

-1

If you don't want a POST method, with jQuery :

$.get('test.html',{foo: 'bar'}, function(data) {
  alert('Load was performed.');
});

See http://api.jquery.com/jQuery.get/

Thierry
  • 4,990
  • 2
  • 22
  • 28
  • 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