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
HttpResponseMessageresponse
details
ProblemDetailsproblem details
options
JsonSerializerOptionsoptional 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
HttpResponseMessageresponse
type
stringA URI reference [RFC3986] that identifies the problem type
title
stringA short, human-readable summary of the problem type
detail
stringA human-readable explanation specific to this occurrence of the problem
instance
stringA URI reference that identifies the specific occurrence of the problem
options
JsonSerializerOptionsoptional JsonSerializerOptions
Returns
- HttpResponseMessage
response