Reply class¶
Defined in
Namespace: Refit.Testing
Assembly: Refit.Testing.dll
Full name: Refit.Testing.Reply
Modifiers: public static
Summary¶
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¶
| Name | Summary |
|---|---|
| static With | Replies with a typed body serialized by the client's content serializer and status 200. |
| static Json | Replies with a raw JSON body and status 200. |
| static Text | Replies with a plain-text body and status 200. |
| static Status | Replies with a bare status code and no body. |
| static Content | Replies with explicit response content used verbatim, and status 200. |
| static From | Replies with a response built from the request, for total control. |