Search Results for

    Show / Hide Table of Contents

    Class RESTRequest

    Represents an HTTP REST request, including endpoint, headers, body, and options. Supports sending requests with various content types and handling responses.

    Inheritance
    object
    RESTRequest
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Glitch9.IO.Networking.RESTApi
    Assembly: Glitch9.IO.dll
    Syntax
    public sealed class RESTRequest

    Constructors

    | Edit this page View Source

    RESTRequest()

    Declaration
    public RESTRequest()
    | Edit this page View Source

    RESTRequest(string, RequestOptions)

    Declaration
    public RESTRequest(string url, RequestOptions options = null)
    Parameters
    Type Name Description
    string url
    RequestOptions options

    Fields

    | Edit this page View Source

    Options

    Declaration
    public readonly RequestOptions Options
    Field Value
    Type Description
    RequestOptions

    Properties

    | Edit this page View Source

    Body

    Raw binary body of the request (e.g., for file uploads or custom payloads).

    Declaration
    public byte[] Body { get; set; }
    Property Value
    Type Description
    byte[]
    | Edit this page View Source

    CancellationToken

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

    ContentType

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

    Context

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

    DownloadOptions

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

    Endpoint

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

    Form

    Optional: Unity WWWForm for form data requests.

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

    HasBody

    Returns true if the request has a body (raw, form, or multipart).

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

    Headers

    Declaration
    public List<HttpHeader> Headers { get; }
    Property Value
    Type Description
    List<HttpHeader>
    | Edit this page View Source

    JssOverride

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

    LogOptions

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

    MultipartFormSections

    Optional: multipart form sections for multipart/form-data requests.

    Declaration
    public List<IMultipartFormSection> MultipartFormSections { get; set; }
    Property Value
    Type Description
    List<IMultipartFormSection>
    | Edit this page View Source

    OutputAudioFormat

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

    StreamOptions

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

    Timeout

    Declaration
    public TimeSpan? Timeout { get; }
    Property Value
    Type Description
    TimeSpan?
    | Edit this page View Source

    UnityWebRequest

    Declaration
    public UnityWebRequest UnityWebRequest { get; set; }
    Property Value
    Type Description
    UnityWebRequest

    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.AddHeader(RESTRequest, HttpHeader)
    PipelineExtensions.AddHeaderRange(RESTRequest, IEnumerable<HttpHeader>)
    PipelineExtensions.GetHeaders(RESTRequest, bool, bool)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation