Edit

Share via


HttpRequestSequenceMock class

Mock http request in sequence order. The last response will be repeated.

Extends

Properties

$kind

The type of request.

body

Gets or sets the body to match against request's body.

matchType

Gets or sets the match type for body.

method

Gets or sets the http method to match. Match to any method if not defined.

responses

Gets the sequence of responses to reply. The last one will be repeated.

url

Gets or sets the url to match.

Methods

setup()

Configures the initial conditions.

Inherited Methods

configure(Record<string, unknown>)

Fluent method for configuring the object.

getConverter(string)

Property Details

$kind

The type of request.

static $kind: string

Property Value

string

body

Gets or sets the body to match against request's body.

body: string

Property Value

string

matchType

Gets or sets the match type for body.

matchType: BodyMatchType

Property Value

method

Gets or sets the http method to match. Match to any method if not defined.

method: HttpMethod

Property Value

HttpMethod

responses

Gets the sequence of responses to reply. The last one will be repeated.

responses: HttpResponseMock[]

Property Value

url

Gets or sets the url to match.

url: string

Property Value

string

Method Details

setup()

Configures the initial conditions.

function setup()

Inherited Method Details

configure(Record<string, unknown>)

Fluent method for configuring the object.

function configure(config: Record<string, unknown>): this

Parameters

config

Record<string, unknown>

Configuration settings to apply.

Returns

this

The Configurable after the operation is complete.

Inherited From Configurable.configure

getConverter(string)

function getConverter(_property: string): Converter | ConverterFactory

Parameters

_property

string

The key of the conditional selector configuration.

Returns

Converter | ConverterFactory

The converter for the selector configuration.

Inherited From Configurable.getConverter