stop_for_status

0th

Percentile

Throw error on http error.

Converts http errors to R errors - this is useful if you want to ensure the appropriate action is taken when an http request fails.

Usage
stop_for_status(x)
Arguments
x
a request object
See Also

Other response methods: content, parsed_content, response, text_content

Aliases
  • stop_for_status
Examples
x <- GET("http://httpbin.org/status/320")
stop_for_status(x) # nothing happens
x <- GET("http://httpbin.org/status/404")
stop_for_status(x)
Documentation reproduced from package httr, version 0.1.1, License: MIT

Community examples

Looks like there are no examples yet.