ices_get_jwt {icesConnect} | R Documentation |
ices_request_jwt
Description
Perform a get request to a url using a javascript web token for authentication
Usage
ices_get_jwt(
url,
username = NULL,
retry = TRUE,
quiet = FALSE,
verbose = FALSE,
jwt = NULL
)
ices_post_jwt(
url,
body = list(),
encode = "json",
username = NULL,
retry = TRUE,
quiet = FALSE,
verbose = FALSE,
jwt = NULL
)
ices_patch_jwt(
url,
body = list(),
encode = "json",
username = NULL,
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"),
username = NULL,
retry = TRUE,
quiet = FALSE,
verbose = FALSE,
jwt = NULL
)
Arguments
url |
the url to make the request to |
username |
the ices username to perform the request as, Default: getOption("ices.username") |
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 |
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 |
Value
httr response object
See Also
ices_token
GET
,add_headers
,stop_for_status
,status_code
Examples
## 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")
## End(Not run)
[Package icesConnect version 1.0.0 Index]