Table of Contents

Method WithProblemDetails

Namespace
HttpBuildR
Assembly
HttpBuildR.ActionResult.dll

WithProblemDetails(HttpResponseMessage, ProblemDetails, JsonSerializerOptions?)

Adds problem details as a json response body

[Pure]
public static HttpResponseMessage WithProblemDetails(this HttpResponseMessage response, ProblemDetails details, JsonSerializerOptions? options = null)

Parameters

response HttpResponseMessage

response

details ProblemDetails

problem details

options JsonSerializerOptions

optional JsonSerializerOptions

Returns

HttpResponseMessage

response

WithProblemDetails(HttpResponseMessage, string?, string?, string?, string?, JsonSerializerOptions?)

Adds problem details as a json response body

[Pure]
public static HttpResponseMessage WithProblemDetails(this HttpResponseMessage response, string? type, string? title, string? detail, string? instance, JsonSerializerOptions? options = null)

Parameters

response HttpResponseMessage

response

type string

A URI reference [RFC3986] that identifies the problem type

title string

A short, human-readable summary of the problem type

detail string

A human-readable explanation specific to this occurrence of the problem

instance string

A URI reference that identifies the specific occurrence of the problem

options JsonSerializerOptions

optional JsonSerializerOptions

Returns

HttpResponseMessage

response