docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class HttpRequestMessageExtensions

    Helper methods for HttpRequestMessage.

    Inheritance
    object
    HttpRequestMessageExtensions
    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 HttpRequestMessageExtensions

    Methods

    GetContentAsByteArrayAsync(HttpRequestMessage)

    Gets a byte array representing the content of an HttpRequestMessage.

    Declaration
    public static Task<byte[]> GetContentAsByteArrayAsync(this HttpRequestMessage request)
    Parameters
    Type Name Description
    HttpRequestMessage request

    The HTTP request message.

    Returns
    Type Description
    Task<byte[]>

    A byte array representing the content of an HttpRequestMessage

    GetContentAsStringAsync(HttpRequestMessage)

    Gets a string representing the content of an HttpRequestMessage.

    Declaration
    public static Task<string> GetContentAsStringAsync(this HttpRequestMessage request)
    Parameters
    Type Name Description
    HttpRequestMessage request

    The HTTP request message.

    Returns
    Type Description
    Task<string>

    A string representing the content of an HttpRequestMessage

    In This Article
    Back to top
    Copyright © 2025 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)