get_async_page | R Documentation |
Sends an asynchronous HTTP GET request to fetch data from a single API page.
get_async_page(full_url, nested)
full_url |
Character string specifying the full URL of the API endpoint to request. |
nested |
Logical value indicating whether to flatten nested lists in the JSON response. |
This function uses future::future()
to perform the HTTP GET request asynchronously.
It retrieves the content from the specified URL, checks for HTTP errors, and parses the JSON response.
A future representing the asynchronous operation, which will resolve to a list containing the parsed JSON response.
Khaled Al-Shamaa, k.el-shamaa@cgiar.org
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.