Create a low-level HTTP API client for use with OrderlyWeb.
orderlyweb_api_client(host, port, token, name = NULL, https = TRUE,
prefix = NULL, api_version = 2, insecure = FALSE,
verbose = FALSE)
Fully qualified hostname for the OrderlyWeb instance
Port to use
Your application token for authentication. The appropriate value here will depend on the authentication support that is built into the OrderlyWeb server that you are communicating with. Provide the token directly (as a string) or provide a callback function that takes no arguments and returns token.
A friendly name for the server (e.g, "production" or
"testing") which may be printed when using the remote, or when
authenticating. If not provided then a name will be constructed
from host
, port
and (if provided)
prefix
.
Optional logical, indicating if this is an https
connection - this should be TRUE
in all production
settings or credentials will be sent in the clear!
A prefix, if your OrderlyWeb server is mounted at a path within some larger website.
The API version to request - this should be left as 2.
Avoid SSL certificate testing - this is completely insecure (as bad as http) and exists only for testing.
Be verbose in all http exchanges. This will be very noisy.
cl <- orderlyweb::orderlyweb_api_client(host = "example.com", port = 443,
token = "mytoken")
cl$is_authorised()
#> [1] FALSE