File: RequestMatcherRegistry.Rd

package info (click to toggle)
r-cran-vcr 0.6.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,360 kB
  • sloc: cpp: 15; sh: 13; makefile: 2
file content (136 lines) | stat: -rw-r--r-- 3,960 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/request_matcher_registry.R
\name{RequestMatcherRegistry}
\alias{RequestMatcherRegistry}
\title{RequestMatcherRegistry}
\description{
handles request matchers
}
\note{
r1=from new request; r2=from recorded interaction
}
\examples{
\dontrun{
(x <- RequestMatcherRegistry$new())
x$default_matchers
x$registry
}
}
\section{Public fields}{
\if{html}{\out{<div class="r6-fields">}}
\describe{
\item{\code{registry}}{initialze registry list with a request, or leave empty}

\item{\code{default_matchers}}{request matchers to use. default: method, uri}
}
\if{html}{\out{</div>}}
}
\section{Methods}{
\subsection{Public methods}{
\itemize{
\item \href{#method-new}{\code{RequestMatcherRegistry$new()}}
\item \href{#method-register}{\code{RequestMatcherRegistry$register()}}
\item \href{#method-register_built_ins}{\code{RequestMatcherRegistry$register_built_ins()}}
\item \href{#method-try_to_register_body_as_json}{\code{RequestMatcherRegistry$try_to_register_body_as_json()}}
\item \href{#method-clone}{\code{RequestMatcherRegistry$clone()}}
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-new"></a>}}
\if{latex}{\out{\hypertarget{method-new}{}}}
\subsection{Method \code{new()}}{
Create a new RequestMatcherRegistry object
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RequestMatcherRegistry$new(
  registry = list(),
  default_matchers = list("method", "uri")
)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{registry}}{initialze registry list with a request, or leave empty}

\item{\code{default_matchers}}{request matchers to use. default: method, uri}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
A new \code{RequestMatcherRegistry} object
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-register"></a>}}
\if{latex}{\out{\hypertarget{method-register}{}}}
\subsection{Method \code{register()}}{
Register a custom matcher
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RequestMatcherRegistry$register(name, func)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{name}}{matcher name}

\item{\code{func}}{function that describes a matcher, should return
a single boolean}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
no return; registers the matcher
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-register_built_ins"></a>}}
\if{latex}{\out{\hypertarget{method-register_built_ins}{}}}
\subsection{Method \code{register_built_ins()}}{
Register all built in matchers
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RequestMatcherRegistry$register_built_ins()}\if{html}{\out{</div>}}
}

\subsection{Returns}{
no return; registers all built in matchers
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-try_to_register_body_as_json"></a>}}
\if{latex}{\out{\hypertarget{method-try_to_register_body_as_json}{}}}
\subsection{Method \code{try_to_register_body_as_json()}}{
Try to register body as JSON
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RequestMatcherRegistry$try_to_register_body_as_json(r1, r2)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{r1, r2}}{\link{Request} class objects}
}
\if{html}{\out{</div>}}
}
\subsection{Returns}{
no return; registers the matcher
}
}
\if{html}{\out{<hr>}}
\if{html}{\out{<a id="method-clone"></a>}}
\if{latex}{\out{\hypertarget{method-clone}{}}}
\subsection{Method \code{clone()}}{
The objects of this class are cloneable with this method.
\subsection{Usage}{
\if{html}{\out{<div class="r">}}\preformatted{RequestMatcherRegistry$clone(deep = FALSE)}\if{html}{\out{</div>}}
}

\subsection{Arguments}{
\if{html}{\out{<div class="arguments">}}
\describe{
\item{\code{deep}}{Whether to make a deep clone.}
}
\if{html}{\out{</div>}}
}
}
}