http_stop_for_status | R Documentation |
Status codes below 400 are considered successful, others will trigger
errors. Note that this is different from the httr
package, which
considers the 3xx status code errors as well.
http_stop_for_status(resp)
resp |
HTTP response from |
The HTTP response invisibly, if it is considered successful. Otherwise an error is thrown.
afun <- async(function() {
http_get("https://eu.httpbin.org/status/404")$
then(http_stop_for_status)
})
tryCatch(synchronise(afun()), error = function(e) e)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.