UnityWebRequestConstructor

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

Parameters

url此 UnityWebRequest 将通信的目标 URL。也可通过 url 属性访问。
uri要向其传输表单数据的目标 URI。
methodHTTP GET, POST, etc. methods.
downloadHandlerReplies from the server.
uploadHandlerUpload data to the server.

Description

使用默认选项创建 UnityWebRequest,且不附加 DownloadHandlerUploadHandler。默认方法为 GET

原始构造函数非常适合需要详细的 UnityWebRequest 自定义配置的用例。大部分用例都需要附加 DownloadHandlerUploadHandler 才能正常运行。

另请参阅:GetGetTextureGetAudioClipGetAssetBundleHeadPostPutDelete