Adding parameters to the request |
You can add parameters to the HTTP request. Parameters, also known as name / value pairs are generally used by servlets and CGI programs to return dynamic content. To add a parameter invoke the HttpRequest#addParameter method.
The arguments to the HttpRequest#addParameter method represent the name and value of the name / value pair.
Example
// add parameter request.addParameter("lastName","Smith");
Note
When using the GET request method, name value pairs will be appended to the end of the URL using a URL encoded format. Using the POST request method name value pairs are embedded within the body of the HTTP request. The GET request supports a maximum of 4KB of data that can be transmitted as name value pairs on the URL. For parameters that exceed the 4KB limit you must use the POST method. |