Learn R Programming

httptest (version 4.2.2)

block_requests: 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()

Arguments

Value

Nothing; called for its side effects.

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.

See Also

without_internet() stop_mocking() use_mock_api()