This set of functions allows the configuration of the remote URL, so the R client package can be used with a different instance of the GPlates web service, including a local implementation (served on localhost).
The function will use the http get method to access the version number of the GPlates Web Service.
Usage
getgws()
setgws(url = "", check = TRUE, reset = FALSE, silent = FALSE)
checkgws(silent = FALSE)
Arguments
- url
(
character
) A single string specifying the URL of the GPlates Web Service (with trailing slash).- check
(
logical
) Flag to specify whether the immediate querying of the GWS is to be performed? If this fails the url won't be set!- reset
(
logical
) Flag to specify whether the factory default should be reset.- silent
Logical flag indicating wheth the output should be silent?
Value
getws
returns a single character string with the URL of the GWS.
Invisible return, either FALSE, or a character string with the version number.
Details
The getws
function returns the current url of the GPLates Web Service (defaults to: https://gws.gplates.org/
).
The setws
function allows the setting of GPLates Web Service URL.
Examples
# Access currently set remote URL.
getgws()
#> [1] "https://gws.gplates.org/"
# In case you have the GWS running on localhost (default port 18000):
# At time of writing this, the local instance does not return version, checking
# does not work!
setgws("http://localhost:18000/", check=FALSE)
# To reset factory defaults
setgws(reset=TRUE, check=FALSE)