TestHttpType

PackageAxial.HttpClient
A scriptable HTTP service test double that records requests and replies through a handler.

Specification

Kind
Type
Members
4
Examples
0
``.ctor``Signature
TestHttp(?startedAt)
ClearSignature
this.Clear
HandlerSignature
this.Handler
SentSignature
this.Sent

Summary

NameSignatureSynopsis
Operations
``.ctor``TestHttp(?startedAt)No description available.
Clearthis.ClearRemoves all recorded requests.
Handlerthis.HandlerProduces a response for each request; the default is 200 with an empty body.
Sentthis.SentThe requests sent so far, in order.

Operations

kind:typekind:member

``.ctor``

TestHttp(?startedAt)
Member

Parameters

NameTypeDescription
startedAtDateTimeOffset

Returns

TestHttp
kind:member

Clear

this.Clear
Member
Removes all recorded requests.

Returns

unit
kind:member

Handler

this.Handler
Member
Produces a response for each request; the default is 200 with an empty body.

Returns

HttpRequest -> Result<HttpResponse, HttpError>
kind:member

Sent

this.Sent
Member
The requests sent so far, in order.

Returns

IReadOnlyList<HttpRequest>