Description Usage Arguments Details
Scraping the web is fraught with peril. URLs die; networks get disrupted and best laid plans for building a corups from links can quickly go awry. Use this funtion to mitigate some of the pain of retrieving web resoures.
1 2 3 |
url |
the url of the page to retrieve |
config |
Additional configuration settings such as http
authentication ( |
timeout |
a call to |
... |
Further named parameters, such as |
body |
One of the following:
|
encode |
If the body is a named list, how should it be encoded? Can be one of form (application/x-www-form-urlencoded), multipart, (multipart/form-data), or json (application/json). For "multipart", list elements can be strings or objects created by
|
handle |
The handle to use with this request. If not
supplied, will be retrieved and reused from the |
This is a thin wrapper for httr::GET()
using purrr::safely()
that will
either return a httr
response
object or NULL
if there was an error.
If you need the reason for the error (e.g. Could not resolve host...
)
you should write your own wrapper.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.