javascript : how to send request in restful

Posted by user495688 on Stack Overflow See other posts from Stack Overflow or by user495688
Published on 2011-01-10T06:47:32Z Indexed on 2011/01/10 8:53 UTC
Read the original article Hit count: 202

Filed under:
|
|

Hello I want to ask you something how do I send a request to the webservice (restful) if the parameters which I will send more than one parameter?

edit:

this.sendRequest = function(){
   var url="http://localhost:8081/inlinetrans/";

   var client = new XMLHttpRequest();
   var oriText ="";
   var stemText ="";
   var folText ="";

   client.open("PUT", url, false);

   client.setRequestHeader("Content-Type", "text/plain");
   client.send(oriText,stemText,folText);


   if (client.status == 200){
   client.responseText;
   }
   else{
    client.statusText;
   }

  }

client.send --> contents parameters which i want send to server

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about rest