block_requests {httptest} | R Documentation |
Block HTTP requests
Description
This function intercepts HTTP requests made through httr
and raises an
informative error instead. It is what without_internet()
does, minus the
automatic disabling of mocking when the context finishes.
Usage
block_requests()
Details
Note that you in order to resume normal request behavior, you will need to
call stop_mocking()
yourself—this function does not clean up after itself
as 'without_internet' does.
Value
Nothing; called for its side effects.
See Also
without_internet()
stop_mocking()
use_mock_api()
[Package httptest version 4.2.2 Index]