Make a low-level call to a QGIS Network API.
qgisremote(path, args = NULL, body = NULL, file = NULL, host = qgisremote.options("host"), auth = qgisremote.options("auth"), as = "parsed")
path | the network API request path (a character string) |
---|---|
args | named list or vector of HTTP GET parameters to be added to the request |
body | optional content body for POST requests.
|
file | optional name of a file on disk from which the content body for
POST requests is read (using the |
host | optional location of the Network API to use for the request, in
|
auth | optional token for authenticating against the Network API plugin
(for default values see |
as | how the response body of successful requests should be returned by
the function: either |
A representation of the response body of the successful API
request. If as = 'parsed'
(the default), the result type depends on the
content-type of the response (see httr::content()
), but will typically
be one of:
a primitive (such as a numeric
or character
string)
a list, representing a complex object parsed from a JSON response
an sf
geometry object (parsed from a GeoJSON response)
If as = 'text'
or as = 'raw'
, returns the full unparsed body of the API
response.