docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class RCUnityWebRequest

    Inheritance
    object
    RCUnityWebRequest
    Implements
    IRCUnityWebRequest
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Services.RemoteConfig
    Assembly: Unity.Services.RemoteConfig.dll
    Syntax
    public class RCUnityWebRequest : IRCUnityWebRequest

    Properties

    certificateHandler

    Holds a reference to a CertificateHandler object, which manages certificate validation for this UnityWebRequest.

    Declaration
    public 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
    public bool disposeCertificateHandlerOnDispose { get; set; }
    Property Value
    Type Description
    bool

    disposeDownloadHandlerOnDispose

    If true, any DownloadHandler attached to this UnityWebRequest will have DownloadHandler.Dispose called automatically when UnityWebRequest.Dispose is called.

    Declaration
    public bool disposeDownloadHandlerOnDispose { get; set; }
    Property Value
    Type Description
    bool

    disposeUploadHandlerOnDispose

    If true, any UploadHandler attached to this UnityWebRequest will have UploadHandler.Dispose called automatically when UnityWebRequest.Dispose is called.

    Declaration
    public bool disposeUploadHandlerOnDispose { get; set; }
    Property Value
    Type Description
    bool

    downloadHandler

    Holds a reference to a DownloadHandler object, which manages body data received from the remote server by this UnityWebRequest.

    Declaration
    public 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
    public float downloadProgress { get; }
    Property Value
    Type Description
    float

    downloadedBytes

    Returns the number of bytes of body data the system has downloaded from the remote server. (Read Only)

    Declaration
    public ulong downloadedBytes { get; }
    Property Value
    Type Description
    ulong

    error

    A human-readable string describing any system errors encountered by this UnityWebRequest object while handling HTTP requests or responses. (Read Only)

    Declaration
    public string error { get; }
    Property Value
    Type Description
    string

    isDone

    Returns true after the UnityWebRequest has finished communicating with the remote server. (Read Only)

    Declaration
    public bool isDone { get; }
    Property Value
    Type Description
    bool

    isHttpError

    Returns true after this UnityWebRequest receives an HTTP response code indicating an error. (Read Only)

    Declaration
    public bool isHttpError { get; }
    Property Value
    Type Description
    bool

    isModifiable

    Returns true while a UnityWebRequest’s configuration properties can be altered. (Read Only)

    Declaration
    public bool isModifiable { get; }
    Property Value
    Type Description
    bool

    isNetworkError

    Returns true after this UnityWebRequest encounters a system error. (Read Only)

    Declaration
    public bool isNetworkError { get; }
    Property Value
    Type Description
    bool

    method

    Defines the HTTP verb used by this UnityWebRequest, such as GET or POST.

    Declaration
    public 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
    public int redirectLimit { get; set; }
    Property Value
    Type Description
    int

    responseCode

    The numeric HTTP response code returned by the server, such as 200, 404 or 500. (Read Only)

    Declaration
    public long responseCode { get; }
    Property Value
    Type Description
    long

    timeout

    Sets UnityWebRequest to attempt to abort after the number of seconds in timeout have passed.

    Declaration
    public int timeout { get; set; }
    Property Value
    Type Description
    int

    unityWebRequest

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

    uploadHandler

    Holds a reference to the UploadHandler object which manages body data to be uploaded to the remote server.

    Declaration
    public 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
    public float uploadProgress { get; }
    Property Value
    Type Description
    float

    uploadedBytes

    Returns the number of bytes of body data the system has uploaded to the remote server. (Read Only)

    Declaration
    public ulong uploadedBytes { get; }
    Property Value
    Type Description
    ulong

    uri

    Defines the target URI for the UnityWebRequest to communicate with.

    Declaration
    public Uri uri { get; set; }
    Property Value
    Type Description
    Uri

    url

    Defines the target URL for the UnityWebRequest to communicate with.

    Declaration
    public 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
    public bool useHttpContinue { get; set; }
    Property Value
    Type Description
    bool

    Methods

    Abort()

    If in progress, halts the UnityWebRequest as soon as possible.

    Declaration
    public void Abort()

    Dispose()

    Signals that this UnityWebRequest is no longer being used, and should clean up any resources it is using.

    Declaration
    public void Dispose()

    GetRequestHeader(string)

    Retrieves the value of a custom request header.

    Declaration
    public 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
    public 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
    public 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()

    Begin communicating with the remote server.

    Declaration
    public UnityWebRequestAsyncOperation SendWebRequest()
    Returns
    Type Description
    UnityWebRequestAsyncOperation

    SetRequestHeader(string, string)

    Set a HTTP request header to a custom value.

    Declaration
    public 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.

    Implements

    IRCUnityWebRequest
    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)