File: RequestIgnorer.Rd

package info (click to toggle)
r-cran-vcr 0.2.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 596 kB
  • sloc: sh: 13; makefile: 2
file content (66 lines) | stat: -rw-r--r-- 1,460 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/request_ignorer.R
\docType{data}
\name{RequestIgnorer}
\alias{RequestIgnorer}
\title{Request ignorer}
\arguments{
\item{LOCALHOST_ALIASES}{A constant with values: 'localhost', '127.0.0.1',
and '0.0.0.0'}

\item{ignored_hosts}{Vector of ignored hosts}

\item{fun}{A function, of the form: coming...}

\item{value}{A localhost value to ignore, e.g, 'localhost'}

\item{hosts}{Character vector of hosts to ignore}

\item{request}{A request}
}
\description{
Request ignorer
}
\details{
Hook to handle request ignorers, including:

\strong{Methods}
\describe{
\item{\code{ignore_request(fun)}}{
Will ignore any request for which the given function
returns \code{TRUE}
}
\item{\code{ignore_localhost()}}{
ignore all localhost values (localhost, 127.0.0.1, 0.0.0.0)
}
\item{\code{ignore_localhost_value(value)}}{
ignore a specific named localhost
}
\item{\code{ignore_hosts(hosts)}}{
ignore any named host
}
\item{\code{should_be_ignored(request)}}{
method to determine whether to ignore a request
}
}
\strong{Private Methods}
\describe{
\item{\code{ignored_hosts_init()}}{
Initialize an empty ignored hosts object on package load
}
}
}
\examples{
\dontrun{
(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
}
}
\keyword{internal}