Search Results for

    Show / Hide Table of Contents

    Class HttpResponseExtensions

    Defines a collection of extensions for a object.

    Inheritance
    System.Object
    HttpResponseExtensions
    Namespace: MADE.Web.Extensions
    Assembly: MADE.Web.dll
    Syntax
    public static class HttpResponseExtensions : object

    Methods

    | Improve this Doc View Source

    WriteJsonAsync(HttpResponse, HttpStatusCode, Object)

    Writes an object value as JSON to the specified response.

    Declaration
    public static async Task WriteJsonAsync(this HttpResponse response, HttpStatusCode statusCode, object value)
    Parameters
    Type Name Description
    HttpResponse response

    The HTTP response to write to.

    HttpStatusCode statusCode

    The status code of the response.

    System.Object value

    The object to serialize as JSON.

    Returns
    Type Description
    Task

    An asynchronous operation.

    | Improve this Doc View Source

    WriteJsonAsync(HttpResponse, HttpStatusCode, Object, JsonSerializerSettings)

    Writes an object value as JSON to the specified response.

    Declaration
    public static async Task WriteJsonAsync(this HttpResponse response, HttpStatusCode statusCode, object value, JsonSerializerSettings serializerSettings)
    Parameters
    Type Name Description
    HttpResponse response

    The HTTP response to write to.

    HttpStatusCode statusCode

    The status code of the response.

    System.Object value

    The object to serialize as JSON.

    JsonSerializerSettings serializerSettings

    The JSON serializer settings.

    Returns
    Type Description
    Task

    An asynchronous operation.

    | Improve this Doc View Source

    WriteJsonAsync(HttpResponse, Int32, Object)

    Writes an object value as JSON to the specified response.

    Declaration
    public static async Task WriteJsonAsync(this HttpResponse response, int statusCode, object value)
    Parameters
    Type Name Description
    HttpResponse response

    The HTTP response to write to.

    System.Int32 statusCode

    The status code of the response.

    System.Object value

    The object to serialize as JSON.

    Returns
    Type Description
    Task

    An asynchronous operation.

    | Improve this Doc View Source

    WriteJsonAsync(HttpResponse, Int32, Object, JsonSerializerSettings)

    Writes an object value as JSON to the specified response.

    Declaration
    public static async Task WriteJsonAsync(this HttpResponse response, int statusCode, object value, JsonSerializerSettings serializerSettings)
    Parameters
    Type Name Description
    HttpResponse response

    The HTTP response to write to.

    System.Int32 statusCode

    The status code of the response.

    System.Object value

    The object to serialize as JSON.

    JsonSerializerSettings serializerSettings

    The JSON serializer settings.

    Returns
    Type Description
    Task

    An asynchronous operation.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright (c) MADE Apps