Share via


ProblemHttpResult Class

Definition

An IResult that on execution will write Problem Details HTTP API responses based on https://tools.ietf.org/html/rfc7807

public sealed class ProblemHttpResult : Microsoft.AspNetCore.Http.IContentTypeHttpResult, Microsoft.AspNetCore.Http.IResult, Microsoft.AspNetCore.Http.IStatusCodeHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult<Microsoft.AspNetCore.Mvc.ProblemDetails>, Microsoft.AspNetCore.Http.Metadata.IEndpointMetadataProvider
public sealed class ProblemHttpResult : Microsoft.AspNetCore.Http.IContentTypeHttpResult, Microsoft.AspNetCore.Http.IResult, Microsoft.AspNetCore.Http.IStatusCodeHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult<Microsoft.AspNetCore.Mvc.ProblemDetails>
type ProblemHttpResult = class
    interface IResult
    interface IEndpointMetadataProvider
    interface IStatusCodeHttpResult
    interface IContentTypeHttpResult
    interface IValueHttpResult
    interface IValueHttpResult<ProblemDetails>
type ProblemHttpResult = class
    interface IResult
    interface IStatusCodeHttpResult
    interface IContentTypeHttpResult
    interface IValueHttpResult
    interface IValueHttpResult<ProblemDetails>
Public NotInheritable Class ProblemHttpResult
Implements IContentTypeHttpResult, IEndpointMetadataProvider, IResult, IStatusCodeHttpResult, IValueHttpResult, IValueHttpResult(Of ProblemDetails)
Public NotInheritable Class ProblemHttpResult
Implements IContentTypeHttpResult, IResult, IStatusCodeHttpResult, IValueHttpResult, IValueHttpResult(Of ProblemDetails)
Inheritance
ProblemHttpResult
Implements

Properties

Name Description
ContentType

Gets the value for the Content-Type header: application/problem+json

ProblemDetails

Gets the ProblemDetails instance.

StatusCode

Gets the HTTP status code.

Methods

Name Description
ExecuteAsync(HttpContext)

Write an HTTP response reflecting the result.

Explicit Interface Implementations

Name Description
IEndpointMetadataProvider.PopulateMetadata(MethodInfo, EndpointBuilder)

Populates metadata for the related Endpoint and MethodInfo.

IStatusCodeHttpResult.StatusCode
IValueHttpResult.Value
IValueHttpResult<ProblemDetails>.Value

Applies to