Generic function to make API calls
call_that_api( api_connection, endpoint, request = NULL, headers = list(), action = c("GET", "POST", "PUT"), ... )
api_connection | A |
---|---|
endpoint | A character variable with containing the endpoint's name. |
request | The body or query sent to the REST API. |
headers | A |
action | The action to request from the API. Supported today are: GET, POST and PUT. |
... | Other arguments to pass to the REST API call. |
It provides a single interface to perform the different calls to an API, such as GET or
POST. This function is meant to be used by developers who which to extend callthat
to
integrate with other API server types.