vcr (version 0.5.4)

RequestIgnorer: Request ignorer

Description

request ignorer methods

Arguments

Public fields

LOCALHOST_ALIASES

A constant with values: 'localhost', '127.0.0.1', and '0.0.0.0'

ignored_hosts

vector of ignored host URI's

Methods

Public methods

Method new()

Create a new RequestIgnorer object

Usage

RequestIgnorer$new()

Returns

A new RequestIgnorer object

Method ignore_request()

Will ignore any request for which the given function returns TRUE

Usage

RequestIgnorer$ignore_request()

Returns

no return; defines request ignorer hook

Method ignore_localhost()

ignore all localhost values (localhost, 127.0.0.1, 0.0.0.0)

Usage

RequestIgnorer$ignore_localhost()

Returns

no return; sets to ignore all localhost aliases

Method ignore_localhost_value()

ignore a specific named localhost

Usage

RequestIgnorer$ignore_localhost_value(value)

Arguments

value

(character) A localhost value to ignore, e.g, 'localhost'

Returns

no return; defines request ignorer hook

Method ignore_hosts()

ignore any named host

Usage

RequestIgnorer$ignore_hosts(hosts)

Arguments

hosts

(character) vector of hosts to ignore

Returns

no return; adds host to ignore

Method should_be_ignored()

method to determine whether to ignore a request

Usage

RequestIgnorer$should_be_ignored(request)

Arguments

request

request to ignore

Returns

no return; defines request ignorer hook

Method clone()

The objects of this class are cloneable with this method.

Usage

RequestIgnorer$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
# NOT RUN {
(x <- RequestIgnorer$new())
x$LOCALHOST_ALIASES
x$ignored_hosts
x$ignore_hosts(hosts = "google.com")
x$ignored_hosts
x$ignore_localhost()
x$ignored_hosts
x$ignore_localhost_value('127.0.0.1')
x$ignored_hosts
# }

Run the code above in your browser using DataCamp Workspace