Called internally for handling incoming requests from Rserve side. Also useful for testing.
Examples
# init simply requestrq = Request$new( path ="/", parameters_query = list("param1"="value1","param2"="value2"), headers = list("Content-encoding"="identity","Custom-field"="value"), cookies = list("sessionId"="1"))# get request UUIDrq$id
# get content acceptrq$accept
# get request content typerq$content_type
# get header by name (lower case)rq$get_header("custom-field")# get query param by namerq$get_param_query("param1")# print requestrq
See Also
Response Application
Public fields
path: Request path.
method: Request HTTP method.
headers: Request headers.
cookies: Request cookies.
context: Environment to store any data. Can be used in middlewares.
content_type: Request body content type.
body: Request body.
parameters_query: Request query parameters.
parameters_body: Request body parameters.
parameters_path: List of parameters extracted from templated path after routing. For example if we have some handler listening at /job/{job_id} and we are receiving request at /job/1 then parameters_path will be list(job_id = "1").
It is important to understand that `parameters_path` will be available (not empty) only after request will reach handler.
This effectively means that `parameters_path` can be used inside handler and response middleware (but not request middleware!).
files: Structure which contains positions and lengths of files for the multipart body.
decode: Function to decode body for the specific content type.
Active bindings
id: Automatically generated UUID for each request. Read only.