Interface IRCUnityWebRequest
Namespace: Unity.Services.RemoteConfig
Syntax
public interface IRCUnityWebRequest
Properties
certificateHandler
Holds a reference to a CertificateHandler object, which manages certificate validation for this UnityWebRequest.
Declaration
CertificateHandler certificateHandler { get; set; }
Property Value
Type | Description |
---|---|
CertificateHandler |
disposeCertificateHandlerOnDispose
If true, any CertificateHandler attached to this UnityWebRequest will have CertificateHandler.Dispose called automatically when UnityWebRequest.Dispose is called.
Declaration
bool disposeCertificateHandlerOnDispose { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
disposeDownloadHandlerOnDispose
If true, any DownloadHandler attached to this UnityWebRequest will have DownloadHandler.Dispose called automatically when UnityWebRequest.Dispose is called.
Declaration
bool disposeDownloadHandlerOnDispose { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
disposeUploadHandlerOnDispose
If true, any UploadHandler attached to this UnityWebRequest will have UploadHandler.Dispose called automatically when UnityWebRequest.Dispose is called.
Declaration
bool disposeUploadHandlerOnDispose { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
downloadedBytes
Returns the number of bytes of body data the system has downloaded from the remote server. (Read Only)
Declaration
ulong downloadedBytes { get; }
Property Value
Type | Description |
---|---|
UInt64 |
downloadHandler
Holds a reference to a DownloadHandler object, which manages body data received from the remote server by this UnityWebRequest.
Declaration
DownloadHandler downloadHandler { get; set; }
Property Value
Type | Description |
---|---|
DownloadHandler |
downloadProgress
Returns a floating-point value between 0.0 and 1.0, indicating the progress of downloading body data from the server. (Read Only)
Declaration
float downloadProgress { get; }
Property Value
Type | Description |
---|---|
Single |
error
A human-readable string describing any system errors encountered by this UnityWebRequest object while handling HTTP requests or responses. (Read Only)
Declaration
string error { get; }
Property Value
Type | Description |
---|---|
String |
isDone
Returns true after the UnityWebRequest has finished communicating with the remote server. (Read Only)
Declaration
bool isDone { get; }
Property Value
Type | Description |
---|---|
Boolean |
isHttpError
Returns true after this UnityWebRequest receives an HTTP response code indicating an error. (Read Only)
Declaration
bool isHttpError { get; }
Property Value
Type | Description |
---|---|
Boolean |
isModifiable
Returns true while a UnityWebRequest’s configuration properties can be altered. (Read Only)
Declaration
bool isModifiable { get; }
Property Value
Type | Description |
---|---|
Boolean |
isNetworkError
Returns true after this UnityWebRequest encounters a system error. (Read Only)
Declaration
bool isNetworkError { get; }
Property Value
Type | Description |
---|---|
Boolean |
method
Defines the HTTP verb used by this UnityWebRequest, such as GET or POST.
Declaration
string method { get; set; }
Property Value
Type | Description |
---|---|
String |
redirectLimit
Indicates the number of redirects which this UnityWebRequest will follow before halting with a “Redirect Limit Exceeded” system error.
Declaration
int redirectLimit { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
responseCode
The numeric HTTP response code returned by the server, such as 200, 404 or 500. (Read Only)
Declaration
long responseCode { get; }
Property Value
Type | Description |
---|---|
Int64 |
timeout
Sets UnityWebRequest to attempt to abort after the number of seconds in timeout have passed.
Declaration
int timeout { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
unityWebRequest
UnityWebRequest object handles the flow of HTTP communication with web servers
Declaration
UnityWebRequest unityWebRequest { get; set; }
Property Value
Type | Description |
---|---|
UnityWebRequest |
uploadedBytes
Returns the number of bytes of body data the system has uploaded to the remote server. (Read Only)
Declaration
ulong uploadedBytes { get; }
Property Value
Type | Description |
---|---|
UInt64 |
uploadHandler
Holds a reference to the UploadHandler object which manages body data to be uploaded to the remote server.
Declaration
UploadHandler uploadHandler { get; set; }
Property Value
Type | Description |
---|---|
UploadHandler |
uploadProgress
Returns a floating-point value between 0.0 and 1.0, indicating the progress of uploading body data to the server.
Declaration
float uploadProgress { get; }
Property Value
Type | Description |
---|---|
Single |
uri
Defines the target URI for the UnityWebRequest to communicate with.
Declaration
Uri uri { get; set; }
Property Value
Type | Description |
---|---|
Uri |
url
Defines the target URL for the UnityWebRequest to communicate with.
Declaration
string url { get; set; }
Property Value
Type | Description |
---|---|
String |
useHttpContinue
Determines whether this UnityWebRequest will include Expect: 100-Continue in its outgoing request headers. (Default: true).
Declaration
bool useHttpContinue { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Abort()
If in progress, halts the UnityWebRequest as soon as possible.
Declaration
void Abort()
Dispose()
Signals that this UnityWebRequest is no longer being used, and should clean up any resources it is using.
Declaration
void Dispose()
GetRequestHeader(String)
Retrieves the value of a custom request header.
Declaration
string GetRequestHeader(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | Name of the custom request header. Case-insensitive. |
Returns
Type | Description |
---|---|
String | The value of the custom request header. If no custom header with a matching name has been set, returns an empty string. |
GetResponseHeader(String)
Retrieves the value of a response header from the latest HTTP response received.
Declaration
string GetResponseHeader(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the HTTP header to retrieve. Case-insensitive. |
Returns
Type | Description |
---|---|
String | The value of the HTTP header from the latest HTTP response. If no header with a matching name has been received, or no responses have been received, returns null. |
GetResponseHeaders()
Retrieves a dictionary containing all the response headers received by this UnityWebRequest in the latest HTTP response.
Declaration
Dictionary<string, string> GetResponseHeaders()
Returns
Type | Description |
---|---|
Dictionary<String, String> | A dictionary containing all the response headers received in the latest HTTP response. If no responses have been received, returns null. |
SendWebRequest()
Begins communicating with the remote server.
Declaration
UnityWebRequestAsyncOperation SendWebRequest()
Returns
Type | Description |
---|---|
UnityWebRequestAsyncOperation | The WebRequestAsyncOperation object. Yielding the WebRequestAsyncOperation inside a coroutine will cause the coroutine to pause until the UnityWebRequest encounters a system error or finishes communicating. |
SetRequestHeader(String, String)
Set a HTTP request header to a custom value.
Declaration
void SetRequestHeader(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
String | name | The key of the header to be set. Case-sensitive. |
String | value | The header's intended value. |