Represents the parameters of an HTTP request passed to a web server from a client browser.
This structure represents the parameters of the HTTP request and includes am_web_req_method_t which defines the action to be performed on the resource (GET, POST, DELETE, etc.).
#include "am_web.h"
typedef struct {
char *url; /* The full request URL */
char *query; /* query string if any */
am_web_req_method_t method; /* request method */
char *path_info; /* path info if any */
char *client_ip; /* client IP if any */
char *cookie_header_val; /* the cookie header value if any */
void *reserved; /* reserved - do not set this */
} am_web_request_params_t;
am_web_request_params_t has the following components:
Pointer to the URL of the resource.
The query string appended to the request URL, if any. For example, if the URL is http://www.example.com?a=b&c=d, the value of this parameter would be a=b&c=d.
One of the following values of the am_web_req_method_t enumeration as defined:
#include "am_web.h"
typedef enum {
AM_WEB_REQUEST_UNKNOWN,
AM_WEB_REQUEST_GET,
AM_WEB_REQUEST_POST,
AM_WEB_REQUEST_HEAD,
AM_WEB_REQUEST_PUT,
AM_WEB_REQUEST_DELETE,
AM_WEB_REQUEST_TRACE,
AM_WEB_REQUEST_OPTIONS
} am_web_req_method_t;
More information on these request methods can be found in http://www.faqs.org/rfcs/rfc2068.html.
The path information in the request URL, if any.
Pointer to the IP address from which the request was sent.
Pointer to the cookie header.
Do not set this.