Barracuda Application Server C/C++ Reference
NO
|
A persistent container object for HTTP parameters.
The parameters in an HttpRequest object are valid only for the duration of the call. The HttpParameter is a container object for the parameters. One can clone the parameters in the request object and save the parameters in an HttpParameter object.
C example:
C++ example:
All parameters are contained within one memory unit and one can simply call baFree(param) when the object is no longer needed.
You use the HttpParameterIterator for iterating the elements in the object.
C example:
C++ Example: See HttpParameterIterator.
#include <HttpServer.h>
Public Member Functions | |
const char * | getParameter (const char *paramName) |
Returns the value of a request parameter as a const char*, or null if the parameter does not exist. More... | |
Static Public Member Functions | |
static U32 | calculateSize (struct HttpRequest *req) |
Calculate the HttpParameter size. | |
static HttpParameter * | clone (void *buf, struct HttpRequest *req) |
Copy HTTP parameters to buf and return as a HttpParameter object. | |
const char * HttpParameter::getParameter | ( | const char * | paramName | ) |
Returns the value of a request parameter as a const char*, or null if the parameter does not exist.
Request parameters are extra information sent with the request, which are contained in the query string or posted form data.
If you use this method with a multivalued parameter, the value returned is equal to the first value in a HttpParameterIterator.