Class HttpResultOptions

Namespace
REslava.Result.Http
Assembly
REslava.Result.Http.dll

Options that control how HTTP responses are mapped to Result<TValue>. Pass an instance to any HttpClientResultExtensions method via the optional options parameter.

public sealed class HttpResultOptions
Inheritance
HttpResultOptions
Inherited Members

Properties

JsonOptions

JSON serializer options used when deserializing the response body. If null, Web is used (camelCase property names, case-insensitive matching).

public JsonSerializerOptions? JsonOptions { get; init; }

Property Value

JsonSerializerOptions

StatusCodeMapper

Custom status code to error mapper. Receives the HTTP status code and the response reason phrase. When set, this completely replaces the built-in default mapping — return the IError you want.

public Func<HttpStatusCode, string?, IError>? StatusCodeMapper { get; init; }

Property Value

Func<HttpStatusCode, string, IError>