Learn R Programming

crul (version 0.5.0)

HttpStubbedResponse: 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

Run this code
# NOT RUN {
(x <- HttpStubbedResponse$new(method = "get", url = "https://httpbin.org"))
x$url
x$method
# }

Run the code above in your browser using DataLab