Basic Induction about the GET Method
The GET method refers to a HyperText Transfer Protocol (HTTP) method that is applied while requesting information from a particular source. It is also used to get a specific variable derived from a group. The HTTP POST asks for input of information from the supplying browser into the server’s message system. Structures of HyperText Markup Language (HTML) come in either POST method or GET method. The method applied, be it the POST method or the GET method, settles on how form data shall be presented before the server.
To understand the attributes of the GET method or otherwise termed as HTTP GET request, here is an outlined comparison between the GET method and the POST methods.
Differences between the POST method and the GET method
1. For the GET method, the parameters maintain within the server since it forms a portion of the URL (Uniform Resource Locator.). On the other hand, the status of parameters of the POST method of HTTP does not remain since it is not within the browser history.
2. The GET method of HTTP is capable of being bookmarked since it is within the URL but the POST method cannot be bookmarked.
3. By way of the GET method of HTTP, one can send parameter information but with a limitation to what is acceptable to the URL. On the other hand, one can send information to the server by POST method without any kind of hindrances, including information in the form of uploaded files. Information inscribed on the URL is limited to an approximate of 2000 characters under the GET method. The POST method does not feature such restrictions.
4. The GET method is easily meddled with, thus is not safe since the information received is also saved in the URL, meaning anyone else can have access to it. This attribute renders the GET method applicability at a disadvantage. On the other hand, the POST method is safer and not easily cracked up. POST parameters are not maintained in the server or webpages thus it is not easily accessed. It is therefore discouraged for one to inscribe delicate information through the GET method such as credit card pins and passcodes. Such information is detectable as information posted on the URL is accessible to anyone.
One can send a GET request with added php object. Here is an example of a GET request with an additional php object about a 54 year old George in Canada. The parameters of the example will send a GET request as follows: test.php?name=George&age=54&country=Canada
ajax({ type: "GET", url: 'test.php', data: {name: 'George'}, age:54, Country: Canada success: function(data){ alert(data); } });
Ajax request is not complicated at all just like the PHP, javascript, and jquery interest. Ajax request can be obtained through the get method. An example of Ajax request on George with JavaScript parameters is as follows;
$.ajax({ type: "GET", url: 'test.php', data: {name: 'George'}, success: function(data){ alert(data); }
From the above sample, the query string shall appear as: test.php?name=George
Overall, HTTP GET requests are something very valuable and useful in a variety of applications.