Skip to content

Reply class

Defined in

Namespace: Refit.Testing Assembly: Refit.Testing.dll Full name: Refit.Testing.Reply Modifiers: public static

Summary

View source

Factory for the StubResponse a StubHttp route returns. With serializes a typed object with the client's own serializer, so tests never hand-write JSON.

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481, net471

Methods

NameSummary
static WithReplies with a typed body serialized by the client's content serializer and status 200.
static JsonReplies with a raw JSON body and status 200.
static TextReplies with a plain-text body and status 200.
static StatusReplies with a bare status code and no body.
static ContentReplies with explicit response content used verbatim, and status 200.
static FromReplies with a response built from the request, for total control.
Inherited members