parse_server_error_or_raise_for_status: Parse the server error or raise for status.

Description Usage Arguments Value Examples

Description

Parse the server error or raise for status.

Usage

1

Arguments

response

A response object from httr::POST or httr::GET.

Value

If the response code is 200 or 204, a parsed response. Else, a server error or raised exception.

Examples

1
2
3
4
5
6
## Not run: 
b2 <- "http://httpbin.org/post"
response <- httr::POST(b2, body = "A simple text string")
parse_server_error_or_raise_for_status(response)

## End(Not run)

gym documentation built on May 1, 2019, 9:26 p.m.