# NOT RUN {
library(httr)
without_internet({
expect_GET(GET("http://httpbin.org/get"),
"http://httpbin.org/get")
expect_PUT(PUT("http://httpbin.org/put", body='{"a":1}'),
'http://httpbin.org/put',
'{"a":1}')
expect_PUT(PUT("http://httpbin.org/put", body='{"a":1}'))
expect_no_request(rnorm(5))
})
# }
Run the code above in your browser using DataLab