HTTP GET

HTTP GET

HTTP GET is a typical request made by a client for a resource on a web server via the HTTP protocol. Generally the protocol itself is transparent to the user, who simply submits the URL of the desired page to a browser. GET is an action verb of the HTTP protocol that translates to the intent to fetch a resource without changing it or causing side effects.

Simple data can sent to the server as part of the request. Thus, HTTP GET and HTTP POST are sometimes spoken of together, and are two common methods by which data can be submitted over the internet, or simply from one program to another. In a Plum IVR application, GET and POST are useful for communication between VoiceXML pages and backend scripts, or simply between VoiceXML pages.

Sending arbitrary data via HTTP GET may be accomplished by appending names and values of variables after the URL followed by a question mark; this part of the URL is called the query string. Name/value variables are separated by an ampersand, and any special characters are encoded by using a percent sign followed by the hexadecimal ASCII code for the character. This is called URL encoding, defined in RFC 1738. JavaScript provides the function encodeURIComponent to assist with this process, and PHP provides the function urlencode.

Let's say there is a script at http://example.com/search.php which expects to be passed two variables by the names "fruit" and "size". Then a URL that includes a GET request might look like the following:

http://example.com/search.php?fruit=kiwi&size=enormous

Certain VoiceXML tags will construct and perform a GET request. Note the use of the method attribute:

<submit next="http://example.com/search.php" namelist="fruit size" method="get"/>
<subdialog src="http://example.com/search.php" namelist="fruit size" method="get"/>

For more information, see the Plum developer documentation, chapter 5, on "Data Exchange."

Related terms

for "HTTP GET"

Search Glossary

Term of the Day

A method for submitting data to a web server and a part of the HTTP protocol. This method is typically used instead of GET when the submission is expected to change resources on the server or cause side effects.
See also: HTTP GET