Request$new(path = "/",
method = c("GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"),
parameters_query = list(),
parameters_body = list(),
headers = list(),
body = list(),
cookies = list(),
content_type = "text/plain",
decode = NULL,
...)
path :: character(1)
Character with requested path. Always starts with /.
method :: character(1)
Request HTTP method.
parameters_path :: named list()
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!).
parameters_query :: named list()
A named list with URL decoded query parameters.
parameters_body :: named list()
A named list with URL decoded body parameters. This field is helpful when request is
a urlencoded form or a multipart form.
headers :: named list()
Request HTTP headers represented as named list.
body :: anything
Request body. Can be anything and in conjunction with content_type
defines how HTTP body will be represented.
cookies :: named list()
cookies represented as named list. Note that cookies should be provided explicitly -
they won't be derived from headers.
content_type :: character(1)
HTTP content type. Note that content_type should be provided explicitly -
it won't be derived from headers.
decode :: function
Function to decode body for the specific content type.