Description Usage Arguments See Also Examples
Internally, this function is used to coerce the request environment objects
httpuv
passes to an application's call
function. Request
environment objects are coerced to objects.
1 2 3 4 | as.request(x)
## S3 method for class 'environment'
as.request(x)
|
x |
An R object. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | e <- new.env(parent = emptyenv())
e$REQUEST_METHOD <- 'GET'
e$PATH_INFO <- '/file/download'
e$HTTP_ACCEPT <- 'application/json'
e$HTTP_CONTENT_LENGTH <- '0'
req <- as.request(e)
is.request(req) # TRUE
method(req)
uri(req)
req[['Accept']]
req[['Content-Length']]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.