Class HttpNotAcceptableException
When thrown, breaks the request handling control flow and sends a redirection response to the client.
Implements
Inherited Members
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 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 |
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
Remarks
This method does nothing; there is no need to call
base.PrepareResponse
in overrides of this method.