rcw.url {rcloud.web}R Documentation

Retrieve properties from the current document

Description

rcw.url returns the URL from the current document

rcw.redirect changes the URL of the current document

rcw.cookies returns the cookies from the current document

rcw.parameters returns the query string as a parsed list

Usage

rcw.url(detailed = TRUE)
rcw.redirect(url)
rcw.cookies(raw = FALSE)
rcw.parameters(cached = FALSE)
rcw.parameter(name, default = NULL, cached = FALSE)

Arguments

detailed

logical, if TRUE then a full list of various components is returned, if FALSE only the URL string is returned

url

new full URL to redirect to

raw

logical, if FALSE then the cookies are parsed into a named list. If TRUE then the full cookie string is passed as-is which is useful for passing credentials to related services.

cached

logical, if FALSE then the current status of the URL is retrieved from the browser. If TRUE then a cached result from last successful rcw.parameters() call will be used if present, otherwise the browser is queried

name

string, name of the parameter to retrieve

default

value to use if the parameter is not set

Value

rcw.url returns a string - the URL - if detailed = FALSE or a list with the components url (full URL), query, path, origin amd hash.

rcw.cookie returns a named list of the cookies (raw = FALSE) or the raw cookie string.

rcw.parameters parses the query string from the document into a list of parameters. rcw.parameter is just a shortcut for rcw.parameters()[[name]] with an is.null() check.

Author(s)

Simon Urbanek


[Package rcloud.web version 1.0-3 Index]