Learn R Programming

vcr (version 0.2.6)

RequestHandlerHttr: RequestHandlerHttr - methods for httr package

Description

RequestHandlerHttr - methods for httr package

Usage

RequestHandlerHttr

Arguments

Format

An object of class R6ClassGenerator of length 24.

Details

Public Methods

handle(request)

Top level function to interaction with. Handle the request

Private Methods

request_type(request)

Get the request type

externally_stubbed()

just returns FALSE

should_ignore()

should we ignore the request, depends on request ignorer infrastructure that's not working yet

has_response_stub()

Check if there is a matching response stub in the http interaction list

get_stubbed_response()

Check for a response and get it

request_summary(request)

get a request summary

on_externally_stubbed_request(request)

on externally stubbed request do nothing

on_ignored_request(request)

on ignored request, do something

on_recordable_request(request)

on recordable request, record the request

on_unhandled_request(request)

on unhandled request, run UnhandledHTTPRequestError

Examples

Run this code
# NOT RUN {
vcr_configure(
 dir = tempdir(),
 record = "once"
)

library(httr)
load("~/httr_req.rda")
req
x <- RequestHandlerHttr$new(req)
# x$handle()
# }

Run the code above in your browser using DataLab