Preparing search index...
The search index is not available
mockttp
mockttp
RequestRule
Class RequestRule
Hierarchy (
view full
)
Explainable
RequestRule
Implements
RequestRule
Implemented by
RequestRule
Index
Constructors
constructor
Properties
id
priority
request
Count
requests
Methods
dispose
explain
handle
is
Complete
matches
Constructors
constructor
new
Request
Rule
(
data
)
:
RequestRule
Parameters
data
:
RequestRuleData
Returns
RequestRule
Properties
id
id
:
string
Readonly
priority
priority
:
number
request
Count
request
Count
:
number
= 0
requests
requests
:
Promise
<
CompletedRequest
>
[]
Methods
dispose
dispose
(
)
:
void
Returns
void
explain
explain
(
withoutExactCompletion
?
)
:
string
Parameters
withoutExactCompletion
:
boolean
= false
Returns
string
handle
handle
(
request
,
response
,
options
)
:
Promise
<
void
>
Parameters
request
:
OngoingRequest
response
:
OngoingResponse
options
:
{
emitEventCallback
?:
(
(
type
:
string
,
event
:
unknown
)
=>
void
)
;
record
:
boolean
;
}
Optional
emit
Event
Callback
?:
(
(
type
:
string
,
event
:
unknown
)
=>
void
)
(
type
,
event
)
:
void
Parameters
type
:
string
event
:
unknown
Returns
void
record
:
boolean
Returns
Promise
<
void
>
handle
(
req
,
res
,
options
)
:
Promise
<
void
>
Parameters
req
:
OngoingRequest
res
:
OngoingResponse
options
:
{
emitEventCallback
?:
(
(
type
:
string
,
event
:
unknown
)
=>
void
)
;
record
?:
boolean
;
}
Optional
emit
Event
Callback
?:
(
(
type
:
string
,
event
:
unknown
)
=>
void
)
(
type
,
event
)
:
void
Parameters
type
:
string
event
:
unknown
Returns
void
Optional
record
?:
boolean
Returns
Promise
<
void
>
is
Complete
is
Complete
(
)
:
null
|
boolean
Returns
null
|
boolean
is
Complete
(
)
:
null
|
boolean
Returns
null
|
boolean
matches
matches
(
request
)
:
MaybePromise
<
boolean
>
Parameters
request
:
OngoingRequest
Returns
MaybePromise
<
boolean
>
matches
(
request
)
:
Promise
<
boolean
>
Parameters
request
:
OngoingRequest
Returns
Promise
<
boolean
>
Settings
Member Visibility
Inherited
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
id
priority
request
Count
requests
Methods
dispose
explain
handle
is
Complete
matches
mockttp
Loading...