Class type Http_types.request


class type request = object .. end
HTTP requests
Inherits
method meth : meth
Returns request method
method uri : string
Returns requested URI (including query string, fragment, ...)
method path : string
Returns requested path
method param : ?meth:meth -> ?default:string -> string -> string
lookup a given parameter
Raises Param_not_found if parameter name was not found
Returns value associated to parameter name
meth : if given restrict the lookup area (e.g. if meth = POST than only parameters received via POST are searched), if not given both GET and POST parameter are searched in an unspecified order (actually the implementation prefers POST parameters but this is not granted, you've been warned)
default : if provided, this value will be returned in case no parameter of that name is available instead of raising Param_not_found
method paramAll : ?meth:meth -> string -> string list
like param above but return a list of values associated to given parameter (a parameter could be defined indeed more than once: passed more than once in a query string or passed both insider the url (the GET way) and inside message body (the POST way))
method params : (string * string) list
Returns the list of all received parameters
method params_GET : (string * string) list
Returns the list of all parameters received via GET
method params_POST : (string * string) list
Returns the list of all parameter received via POST
method cookies : (string * string) list option
method authorization : auth_info option
Returns authorization information, if given by the client