R: stubbed response object

HttpStubbedResponse {crul} | R Documentation

## stubbed response object

### Description

stubbed response object

### Arguments

`url` | (character) A url
`opts` | (list) curl options
`handle` | A handle

### Details

Methods

`parse()`

  Parse the raw response content to text

`success()`

  Was status code less than or equal to 201. returns boolean

`status_http()`

  Get HTTP status code, message, and explanation

`raise_for_status()`

  Check HTTP status and stop with appropriate HTTP error code and message if >= 300. - If you have `fauxpas` installed we use that, otherwise use httpcode

### Examples

    (x <- HttpStubbedResponse$new(method = "get", url = "https://httpbin.org"))
    x$url
    x$method

[Package crul version 0.5.0 Index]