What is the difference between HTTP GET and POST method?
-
Can i send data through querystring and body using HTTP POST method? mads
-
Can i send data through querystring and body using HTTP POST method? mads
The GET method passes the data through the querystring whereas the POST passes it through the form.
Mark, http://aspnetlibrary.com
-
Can i send data through querystring and body using HTTP POST method? mads
crazy_mads wrote:
What is the difference between HTTP GET and POST method?
Get means all informations send by the browser is visible. In post the information is hidden.
crazy_mads wrote:
Can i send data through querystring and body using HTTP POST method?
What do u mean by body ?
string Cheers = "Navaneeth!!" www.w3hearts.com
-
crazy_mads wrote:
What is the difference between HTTP GET and POST method?
Get means all informations send by the browser is visible. In post the information is hidden.
crazy_mads wrote:
Can i send data through querystring and body using HTTP POST method?
What do u mean by body ?
string Cheers = "Navaneeth!!" www.w3hearts.com
function GetData() { //make the object here // to communicate/send data to the server, you need to add data as a //querystring. for this, make a variable called url. Let it refer to the same //page. Assuming, you have this page called AJAX.aspx, var url='AJAX.aspx'; //if you wanna pass the contents of a textbox named 'txtOrderNumber' //get the textbox var reqdBox = GetObject('txtOrderNumber','input'); //append the value to the url url = url + '?Data=' + reqdBox.value; //the step above is important as this is the only way data is sent to server. //then, open the oxmlhttp object and pass the reqd. parameters. oxmlhttp.open("GET",url,true); //(method, reqd url, async?) //as we are saying GET in the method, we have to pass null as a parameter // for the send() method. ie oxmlhttp.send(null); //this will send the data to the server asynchronously.
Now here, when i call oxmlhttp.open("GET",url,true); method, instead of using "GET" can i use "POST" and still send Data=' + reqdBox.value; as a Querystring. Mads -
function GetData() { //make the object here // to communicate/send data to the server, you need to add data as a //querystring. for this, make a variable called url. Let it refer to the same //page. Assuming, you have this page called AJAX.aspx, var url='AJAX.aspx'; //if you wanna pass the contents of a textbox named 'txtOrderNumber' //get the textbox var reqdBox = GetObject('txtOrderNumber','input'); //append the value to the url url = url + '?Data=' + reqdBox.value; //the step above is important as this is the only way data is sent to server. //then, open the oxmlhttp object and pass the reqd. parameters. oxmlhttp.open("GET",url,true); //(method, reqd url, async?) //as we are saying GET in the method, we have to pass null as a parameter // for the send() method. ie oxmlhttp.send(null); //this will send the data to the server asynchronously.
Now here, when i call oxmlhttp.open("GET",url,true); method, instead of using "GET" can i use "POST" and still send Data=' + reqdBox.value; as a Querystring. MadsSorry i made mistake Now here, can i call oxmlhttp.open("GET",url,true); method, instead of using "GET" can i use "POST" and still send Data=' + reqdBox.value; as a Querystring. Mads
-
Can i send data through querystring and body using HTTP POST method? mads
Here is the good article that explains HTTP POST and HTTP GET request http://patelshailesh.com/index.php/http-get-and-http-post-in-asp-net