Unosquare
    Show / Hide Table of Contents

    Class HttpNotAcceptableException

    When thrown, breaks the request handling control flow and sends a redirection response to the client.

    Inheritance
    Object
    HttpException
    HttpNotAcceptableException
    Implements
    IHttpException
    Inherited Members
    HttpException.InternalServerError(String, Object)
    HttpException.Unauthorized(String, Object)
    HttpException.Forbidden(String, Object)
    HttpException.BadRequest(String, Object)
    HttpException.NotFound(String, Object)
    HttpException.MethodNotAllowed(String, Object)
    HttpException.NotAcceptable()
    HttpException.NotAcceptable(String)
    HttpException.RangeNotSatisfiable()
    HttpException.RangeNotSatisfiable(Nullable<Int64>)
    HttpException.Redirect(String)
    HttpException.Redirect(String, Int32)
    HttpException.Redirect(String, HttpStatusCode)
    HttpException.StatusCode
    HttpException.DataObject
    HttpException.IHttpException.Message
    Namespace: EmbedIO
    Syntax
    public class HttpNotAcceptableException : HttpException, IHttpException

    Constructors

    HttpNotAcceptableException()

    Initializes a new instance of the HttpNotAcceptableException class, without specifying a value for the response's Vary header.

    Declaration
    public HttpNotAcceptableException()

    HttpNotAcceptableException(String)

    Initializes a new instance of the HttpNotAcceptableException class.

    Declaration
    public HttpNotAcceptableException(string vary)
    Parameters
    Type Name Description
    String vary

    A value, or a comma-separated list of values, to set the response's Vary header to.

    Although not specified in RFC7231, this may help the client to understand why the request has been rejected.

    If this parameter is null or the empty string, the response's Vary header is not set.

    Properties

    Vary

    Gets the value, or comma-separated list of values, to be set on the response's Vary header.

    Declaration
    public string Vary { get; }
    Property Value
    Type Description
    String
    Remarks

    If the empty string has been passed to the HttpNotAcceptableException(String) constructor, the value of this property is null.

    Methods

    PrepareResponse(IHttpContext)

    Sets necessary headers, as required by the nature of the HTTP exception (e.g. Location for HttpRedirectException).

    Declaration
    public override void PrepareResponse(IHttpContext context)
    Parameters
    Type Name Description
    IHttpContext context

    The HTTP context of the response.

    Overrides
    HttpException.PrepareResponse(IHttpContext)
    Remarks

    This method does nothing; there is no need to call base.PrepareResponse in overrides of this method.

    Implements

    IHttpException

    Comments

    Back to top Copyright © 2017-2019 Unosquare