Learn R Programming

ptm (version 0.2.7)

gracefully_fail: Check that Internet Resource Work Properly and Fail Gracefully When Not

Description

Checks that internet resource works properly and fail gracefully when not.

Usage

gracefully_fail(call, timeout = 10,  ...)

Value

The response object or NULL when the server does not respond properly.

Arguments

call

url of the resource.

timeout

set maximum request time in seconds.

...

further named parameters, such as query, headers, etc.

Author

thefactmachine

Details

To be used as an ancillary function.

References

https://gist.github.com/thefactmachine/18279b7796c0836d9188

Examples

Run this code
gracefully_fail("http://httpbin.org/delay/2")

Run the code above in your browser using DataLab