call_endpoint | R Documentation |
Sends an HTTP request to a specified API endpoint using the stored bearer token for authentication.
call_endpoint(method, endpoint, params = list(), data = NULL)
method |
The HTTP method (e.g., "GET", "POST", "PUT", "DELETE"). |
endpoint |
The API endpoint (e.g., '/api/projects'). |
params |
A named list of query parameters (optional). |
data |
A named list or 'JSON' object to include in the request body (optional). |
A list containing the API response.
## Not run:
response <- call_endpoint("GET", "/api/projects")
print(response)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.