docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class HttpResponseMessageExtensions

    Helper methods for HttpResponseMessage.

    Inheritance
    object
    HttpResponseMessageExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Cloud.Common
    Assembly: Unity.Cloud.Common.dll
    Syntax
    public static class HttpResponseMessageExtensions

    Methods

    GetContentAsString(HttpResponseMessage)

    Gets a string representing the content of an HttpResponseMessage.

    Declaration
    public static Task<string> GetContentAsString(this HttpResponseMessage response)
    Parameters
    Type Name Description
    HttpResponseMessage response

    The HTTP response message.

    Returns
    Type Description
    Task<string>

    JsonDeserializeAsync<T>(HttpResponseMessage)

    Deserializes the content of an HttpResponseMessage to a specified type.

    Declaration
    public static Task<T> JsonDeserializeAsync<T>(this HttpResponseMessage response)
    Parameters
    Type Name Description
    HttpResponseMessage response

    The HTTP response message to deserialize.

    Returns
    Type Description
    Task<T>
    Type Parameters
    Name Description
    T

    The type to deserialize to.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)