View source: R/ices_request_jwt.R
ices_get | R Documentation |
Perform a get request to a url using a javascript web token for authentication
ices_get(
url,
retry = TRUE,
quiet = FALSE,
verbose = FALSE,
content = TRUE,
use_token = FALSE,
jwt = NULL
)
ices_get_jwt(url, retry = TRUE, quiet = FALSE, verbose = FALSE, jwt = NULL)
ices_patch_jwt(
url,
body = list(),
encode = "json",
retry = TRUE,
quiet = FALSE,
verbose = FALSE,
jwt = NULL
)
ices_post(
url,
body = list(),
retry = TRUE,
verbose = FALSE,
content = TRUE,
use_token = TRUE,
encode = "multipart"
)
ices_post_jwt(
url,
body = list(),
encode = "json",
retry = TRUE,
quiet = FALSE,
verbose = FALSE,
jwt = NULL
)
ices_request_jwt(
type = c("GET", "POST", "PATCH"),
url,
body = NULL,
encode = c("multipart", "form", "json", "raw"),
retry = TRUE,
quiet = FALSE,
verbose = FALSE,
jwt = NULL
)
url |
the url to make the request to |
retry |
if initial request fails, should a retry be made, Default: TRUE |
quiet |
suppress informative messages to the console |
verbose |
should the http request return verbose output |
content |
logical, if TRUE the content of the response is returned, if FALSE the http response object is returned |
use_token |
logical, if TRUE the token is used, if FALSE the token is not used |
jwt |
option to supply a token bypassing the ices_token() route, if "" no token is used |
body |
optional body of request |
encode |
If the body is a named list, how should it be encoded? |
type |
the type of request to make, GET, POST or PATCH |
http response object
ices_token
GET
,add_headers
,stop_for_status
,status_code
## Not run:
# this function is interactive and asks the user for a password
ices_request_jwt("GET", "https://taf.ices.dk/vms/api/gearwidths")
ices_get_jwt("https://taf.ices.dk/vms/api/gearwidths")
the top level function
ices_get("https://taf.ices.dk/vms/api/gearwidths", content = FALSE, use_token = TRUE)
ices_get("https://taf.ices.dk/vms/api/gearwidths", content = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.