Search Results for

    Show / Hide Table of Contents

    Class RESTResponse

    The base class for all API objects returned by Glitch9.IO.Networking.RESTApi.RESTApiV7. This class encapsulates common properties and methods for handling various types of outputs from REST API responses.

    Inheritance
    object
    ResultBase
    RESTResponse
    DownloadResult
    RESTDownloadResponse
    RESTResponse<T>
    Implements
    IResult
    Inherited Members
    ResultBase.IsFailure
    ResultBase.ErrorMessage
    ResultBase.Exception
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.IO.Networking.RESTApi
    Assembly: Glitch9.IO.dll
    Syntax
    public class RESTResponse : ResultBase, IResult

    Properties

    | Edit this page View Source

    AudioOutput

    Audio data output from the API as an AudioClip object

    Declaration
    public AudioOutput AudioOutput { get; set; }
    Property Value
    Type Description
    AudioOutput
    | Edit this page View Source

    BinaryOutput

    Binary data output from the API

    Declaration
    public ReadOnlyMemory<byte> BinaryOutput { get; set; }
    Property Value
    Type Description
    ReadOnlyMemory<byte>
    | Edit this page View Source

    FileOutput

    File output from the API as a UnityFile object

    Declaration
    public SerializableFile FileOutput { get; set; }
    Property Value
    Type Description
    SerializableFile
    | Edit this page View Source

    HasBody

    Whether the API response has an empty body.

    Declaration
    public virtual bool HasBody { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Headers

    HTTP headers returned in the API response

    Declaration
    public Dictionary<string, string> Headers { get; set; }
    Property Value
    Type Description
    Dictionary<string, string>
    | Edit this page View Source

    ImageOutput

    Image data output from the API as a Texture2D object

    Declaration
    public ImageOutput ImageOutput { get; set; }
    Property Value
    Type Description
    ImageOutput
    | Edit this page View Source

    IsSuccess

    Declaration
    public override bool IsSuccess { get; }
    Property Value
    Type Description
    bool
    Overrides
    ResultBase.IsSuccess
    | Edit this page View Source

    OutputPath

    The absolute path (full path) where the output file is saved

    Declaration
    public string OutputPath { get; set; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    StatusCode

    The HTTP status code of the API response.

    Declaration
    public long StatusCode { get; set; }
    Property Value
    Type Description
    long
    | Edit this page View Source

    TextOutput

    Text data output from the API

    Declaration
    public string TextOutput { get; set; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    FromUwr<T>(UnityWebRequest)

    Declaration
    public static T FromUwr<T>(UnityWebRequest uwr) where T : RESTResponse, new()
    Parameters
    Type Name Description
    UnityWebRequest uwr
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    GetHeader(string)

    Declaration
    public string GetHeader(string headerName)
    Parameters
    Type Name Description
    string headerName
    Returns
    Type Description
    string

    Implements

    IResult

    Extension Methods

    ArrayExtensions.ToArrayOrEmpty<T>(T)
    ArrayExtensions.ToArrayOrNull<T>(T)
    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    PipelineExtensions.GetResponseHeaderBooleanValue(RESTResponse, string)
    PipelineExtensions.GetResponseHeaderValue(RESTResponse, string)
    RESTApiUnityObjectUtils.GetAudioClipPayload(RESTResponse)
    RESTApiUnityObjectUtils.GetTexture2DPayload(RESTResponse)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation