Class RESTRequest
Represents an HTTP REST request, including endpoint, headers, body, and options.
Supports sending requests with various content types and handling responses.
Assembly: Glitch9.IO.dll
Syntax
public sealed class RESTRequest
Constructors
|
Edit this page
View Source
RESTRequest()
Declaration
|
Edit this page
View Source
RESTRequest(string, RequestOptions)
Declaration
public RESTRequest(string url, RequestOptions options = null)
Parameters
Fields
|
Edit this page
View Source
Options
Declaration
public readonly RequestOptions Options
Field Value
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
|
Edit this page
View Source
CancellationToken
Declaration
public CancellationToken CancellationToken { get; }
Property Value
|
Edit this page
View Source
ContentType
Declaration
public MimeType ContentType { get; }
Property Value
|
Edit this page
View Source
Context
Declaration
public CurlContext Context { get; set; }
Property Value
|
Edit this page
View Source
DownloadOptions
Declaration
public DownloadOptions DownloadOptions { get; }
Property Value
|
Edit this page
View Source
Endpoint
Declaration
public string Endpoint { get; set; }
Property Value
|
Edit this page
View Source
Optional: Unity WWWForm for form data requests.
Declaration
public WWWForm Form { get; set; }
Property Value
|
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
|
Edit this page
View Source
Declaration
public List<HttpHeader> Headers { get; }
Property Value
|
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
|
Edit this page
View Source
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
Declaration
public AudioFormat OutputAudioFormat { get; }
Property Value
|
Edit this page
View Source
StreamOptions
Declaration
public StreamOptions StreamOptions { get; }
Property Value
|
Edit this page
View Source
Timeout
Declaration
public TimeSpan? Timeout { get; }
Property Value
|
Edit this page
View Source
UnityWebRequest
Declaration
public UnityWebRequest UnityWebRequest { get; set; }
Property Value
| Type |
Description |
| UnityWebRequest |
|
Extension Methods