UnityWebRequest Constructor

Declaration

public UnityWebRequest();

Declaration

public UnityWebRequest(string url);

Declaration

public UnityWebRequest(Uri uri);

Declaration

public UnityWebRequest(string url, string method);

Declaration

public UnityWebRequest(Uri uri, string method);

Declaration

public UnityWebRequest(string url, string method, Networking.DownloadHandler downloadHandler, Networking.UploadHandler uploadHandler);

Declaration

public UnityWebRequest(Uri uri, string method, Networking.DownloadHandler downloadHandler, Networking.UploadHandler uploadHandler);

Parameters

url The target URL with which this UnityWebRequest will communicate. Also accessible via the url property.
uri The target URI to which form data will be transmitted.
method HTTP GET, POST, etc. methods.
downloadHandler Replies from the server.
uploadHandler Upload data to the server.

Description

Creates a UnityWebRequest with the default options and no attached DownloadHandler or UploadHandler. Default method is GET.

The raw constructor is useful for use cases which require detailed custom configuration of a UnityWebRequest. Most use cases will require the attachment of a DownloadHandler, an UploadHandler or both in order to function propertly.

Additional resources: Get, GetTexture, GetAudioClip, GetAssetBundle, Head, Post, Put, Delete.


Did you find this page useful? Please give it a rating: