Unosquare
    Show / Hide Table of Contents

    Class RequestHandler

    Provides standard request handler callbacks.

    Inheritance
    Object
    RequestHandler
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: EmbedIO
    Syntax
    public static class RequestHandler

    Methods

    PassThrough()

    Returns an exception object that, when thrown from a module's HandleRequestAsync(IHttpContext) method, will cause the HTTP context to be passed down along the module chain, regardless of the value of the module's IsFinalHandler property.

    Declaration
    public static Exception PassThrough()
    Returns
    Type Description
    Exception

    A newly-created .

    ThrowBadRequest(String)

    Returns a RequestHandlerCallback that unconditionally sends a 400 Bad Request response.

    Declaration
    public static RequestHandlerCallback ThrowBadRequest(string message = null)
    Parameters
    Type Name Description
    String message

    A message to include in the response.

    Returns
    Type Description
    RequestHandlerCallback

    A RequestHandlerCallback.

    ThrowForbidden(String)

    Returns a RequestHandlerCallback that unconditionally sends a 403 Forbidden response.

    Declaration
    public static RequestHandlerCallback ThrowForbidden(string message = null)
    Parameters
    Type Name Description
    String message

    A message to include in the response.

    Returns
    Type Description
    RequestHandlerCallback

    A RequestHandlerCallback.

    ThrowMethodNotAllowed(String)

    Returns a RequestHandlerCallback that unconditionally sends a 405 Method Not Allowed response.

    Declaration
    public static RequestHandlerCallback ThrowMethodNotAllowed(string message = null)
    Parameters
    Type Name Description
    String message

    A message to include in the response.

    Returns
    Type Description
    RequestHandlerCallback

    A RequestHandlerCallback.

    ThrowNotFound(String)

    Returns a RequestHandlerCallback that unconditionally sends a 404 Not Found response.

    Declaration
    public static RequestHandlerCallback ThrowNotFound(string message = null)
    Parameters
    Type Name Description
    String message

    A message to include in the response.

    Returns
    Type Description
    RequestHandlerCallback

    A RequestHandlerCallback.

    ThrowUnauthorized(String)

    Returns a RequestHandlerCallback that unconditionally sends a 401 Unauthorized response.

    Declaration
    public static RequestHandlerCallback ThrowUnauthorized(string message = null)
    Parameters
    Type Name Description
    String message

    A message to include in the response.

    Returns
    Type Description
    RequestHandlerCallback

    A RequestHandlerCallback.

    See Also

    RequestHandlerCallback

    Comments

    Back to top Copyright © 2017-2019 Unosquare