UnityWebRequest 方法机翻

  //
    // 摘要:
    //     The UnityWebRequest object is used to communicate with web servers.
    [NativeHeader("Modules/UnityWebRequest/Public/UnityWebRequest.h")]
    public class UnityWebRequest : IDisposable
    {
    
    
        //
        // 摘要:
        //     The string "GET", commonly used as the verb for an HTTP GET request.
        字符串“GET”,通常用作HTTP GET请求的动词。
        public const string kHttpVerbGET = "GET";
        //
        // 摘要:
        //     The string "HEAD", commonly used as the verb for an HTTP HEAD request.
        字符串“HEAD”,通常用作HTTP HEAD请求的动词。
        public const string kHttpVerbHEAD = "HEAD";
        //
        // 摘要:
        //     The string "POST", commonly used as the verb for an HTTP POST request.
        字符串“POST”,通常用作HTTP POST请求的动词。
        public const string kHttpVerbPOST = "POST";
        //
        // 摘要:
        //     The string "PUT", commonly used as the verb for an HTTP PUT request.
        字符串“PUT”,通常用作HTTP PUT请求的动词。
        public const string kHttpVerbPUT = "PUT";
        //
        // 摘要:
        //     The string "CREATE", commonly used as the verb for an HTTP CREATE request.
        字符串“CREATE”,通常用作HTTP创建请求的动词。
        public const string kHttpVerbCREATE = "CREATE";
        //
        // 摘要:
        //     The string "DELETE", commonly used as the verb for an HTTP DELETE request.
        字符串“DELETE”,通常用作HTTP DELETE请求的动词。
        public const string kHttpVerbDELETE = "DELETE";

        //
        // 摘要:
        //     Creates a UnityWebRequest with the default options and no attached DownloadHandler
        //     or UploadHandler. Default method is GET.
        使用默认选项创建UnityWebRequest,没有附加的下载处理程序
		或UploadHandler。默认方法是GET。
        // 参数:
        //   url:
        //     The target URL with which this UnityWebRequest will communicate. Also accessible
        //     via the url property.
        UnityWebRequest将与之通信的目标URL。也可以
		通过url属性。
        //   uri:
        //     The target URI to which form data will be transmitted.
        将向其传输表单数据的目标URI。
        //   method:
        //     HTTP GET, POST, etc. methods.
        HTTP GET、POST等方法。
        //   downloadHandler:
        //     Replies from the server.
        来自服务器的回复。
        //   uploadHandler:
        //     Upload data to the server.
        上传数据到服务器。
        public UnityWebRequest();
        //
        // 摘要:
        //     Creates a UnityWebRequest with the default options and no attached DownloadHandler
        //     or UploadHandler. Default method is GET.
        //
        // 参数:
        //   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.
        public UnityWebRequest(string url);
        //
        // 摘要:
        //     Creates a UnityWebRequest with the default options and no attached DownloadHandler
        //     or UploadHandler. Default method is GET.
        //
        // 参数:
        //   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.
        public UnityWebRequest(Uri uri);
        //
        // 摘要:
        //     Creates a UnityWebRequest with the default options and no attached DownloadHandler
        //     or UploadHandler. Default method is GET.
        //
        // 参数:
        //   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.
        public UnityWebRequest(string url, string method);
        //
        // 摘要:
        //     Creates a UnityWebRequest with the default options and no attached DownloadHandler
        //     or UploadHandler. Default method is GET.
        //
        // 参数:
        //   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.
        public UnityWebRequest(Uri uri, string method);
        //
        // 摘要:
        //     Creates a UnityWebRequest with the default options and no attached DownloadHandler
        //     or UploadHandler. Default method is GET.
        //
        // 参数:
        //   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.
        public UnityWebRequest(Uri uri, string method, DownloadHandler downloadHandler, UploadHandler uploadHandler);
        //
        // 摘要:
        //     Creates a UnityWebRequest with the default options and no attached DownloadHandler
        //     or UploadHandler. Default method is GET.
        //
        // 参数:
        //   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.
        public UnityWebRequest(string url, string method, DownloadHandler downloadHandler, UploadHandler uploadHandler);

        ~UnityWebRequest();

        //
        // 摘要:
        //     If true, any DownloadHandler attached to this UnityWebRequest will have DownloadHandler.Dispose
        //     called automatically when UnityWebRequest.Dispose is called.
        如果为真,任何附加到UnityWebRequest的下载处理程序都将有下载处理程序。UnityWebRequest时自动调用Dispose。
        处理。
        public bool disposeDownloadHandlerOnDispose {
    
     get; set; }
        //
        // 摘要:
        //     If true, any UploadHandler attached to this UnityWebRequest will have UploadHandler.Dispose
        //     called automatically when UnityWebRequest.Dispose is called.
        如果为真,任何附加到UnityWebRequest的UploadHandler都将拥有UploadHandler. dispose
        在UnityWebRequest时自动调用。处理。
        public bool disposeUploadHandlerOnDispose {
    
     get; set; }
        //
        // 摘要:
        //     Defines the HTTP verb used by this UnityWebRequest, such as GET or POST.
        定义UnityWebRequest使用的HTTP动词,如GET或POST。
        public string method {
    
     get; set; }
        //
        // 摘要:
        //     A human-readable string describing any system errors encountered by this UnityWebRequest
        //     object while handling HTTP requests or responses. (Read Only)
        一个人类可读的字符串,描述UnityWebRequest遇到的任何系统错误
		处理HTTP请求或响应时的对象。(只读)**触发的报错**
        public string error {
    
     get; }
        //
        // 摘要:
        //     Determines whether this UnityWebRequest will include Expect: 100-Continue in
        //     its outgoing request headers. (Default: true).
        确定这个UnityWebRequest是否包含Expect: 100-Continue in
		它的发送请求头。(默认值:true)public bool useHttpContinue {
    
     get; set; }
        //
        // 摘要:
        //     Defines the target URL for the UnityWebRequest to communicate with.
        定义UnityWebRequest要与之通信的目标URL。
        public string url {
    
     get; set; }
        //
        // 摘要:
        //     Defines the target URI for the UnityWebRequest to communicate with.
        定义UnityWebRequest要与之通信的目标URI。
        public Uri uri {
    
     get; set; }
        //
        // 摘要:
        //     The numeric HTTP response code returned by the server, such as 200, 404 or 500.
        //     (Read Only)
        服务器返回的数字HTTP响应代码,如200404500(只读)
        public long responseCode {
    
     get; }
        //
        // 摘要:
        //     Returns a floating-point value between 0.0 and 1.0, indicating the progress of
        //     uploading body data to the server.
        返回0.01.0之间的浮点值,指示的进度正在向服务器上传身体数据。
        public float uploadProgress {
    
     get; }
        //
        // 摘要:
        //     Returns true while a UnityWebRequest’s configuration properties can be altered.
        //     (Read Only)
        返回true,而UnityWebRequest的配置属性可以改变。(只读)
        public bool isModifiable {
    
     get; }
        //
        // 摘要:
        //     Indicates the number of redirects which this UnityWebRequest will follow before
        //     halting with a “Redirect Limit Exceeded” system error.
        指示此UnityWebRequest将遵循的重定向次数在“超过重定向限制”的系统错误中停止。**指定报错的次数,超过就会停止运行**
        public int redirectLimit {
    
     get; set; }
        //
        // 摘要:
        //     Returns true after this UnityWebRequest encounters a system error. (Read Only)
        在UnityWebRequest遇到系统错误后返回true(只读)
        public bool isNetworkError {
    
     get; }
        //
        // 摘要:
        //     Returns true after this UnityWebRequest receives an HTTP response code indicating
        //     an error. (Read Only)
        在UnityWebRequest遇到系统错误后返回true。在UnityWebRequest接收到HTTP响应代码后返回true一个错误。(只读)
        public bool isHttpError {
    
     get; }
        //
        // 摘要:
        //     Returns a floating-point value between 0.0 and 1.0, indicating the progress of
        //     downloading body data from the server. (Read Only)
        返回0.01.0之间的浮点值,指示的进度从服务器下载主体数据。(只读)**下载进度的百分比**
        public float downloadProgress {
    
     get; }
        //
        // 摘要:
        //     Returns the number of bytes of body data the system has uploaded to the remote
        //     server. (Read Only)
        返回系统已上载到远程的体数据的字节数服务器。(只读)**上传的真实进度**
        public ulong uploadedBytes {
    
     get; }
        //
        // 摘要:
        //     Returns the number of bytes of body data the system has downloaded from the remote
        //     server. (Read Only)
        返回系统从远程下载的体数据的字节数服务器。(只读)**下载的真实进度**
        public ulong downloadedBytes {
    
     get; }
        //
        // 摘要:
        //     If true, any CertificateHandler attached to this UnityWebRequest will have CertificateHandler.Dispose
        //     called automatically when UnityWebRequest.Dispose is called.
        如果是真的,任何附加到UnityWebRequest的CertificateHandler都将拥有CertificateHandler. dispose
		在UnityWebRequest时自动调用。处理。
        public bool disposeCertificateHandlerOnDispose {
    
     get; set; }
        //
        // 摘要:
        //     Indicates whether the UnityWebRequest system should employ the HTTP/1.1 chunked-transfer
        //     encoding method.
        指示UnityWebRequest系统是否应该使用HTTP/1.1块传输编码方法。
        public bool chunkedTransfer {
    
     get; set; }
        //
        // 摘要:
        //     Holds a reference to the UploadHandler object which manages body data to be uploaded
        //     to the remote server.
        获取对UploadHandler对象的引用,该对象管理要上载的主体数据到远程服务器。
        public UploadHandler uploadHandler {
    
     get; set; }
        //
        // 摘要:
        //     Holds a reference to a DownloadHandler object, which manages body data received
        //     from the remote server by this UnityWebRequest.
        保存对DownloadHandler对象的引用,该对象管理接收到的主体数据由这个UnityWebRequest远程服务器。
        public DownloadHandler downloadHandler {
    
     get; set; }
        //
        // 摘要:
        //     Holds a reference to a CertificateHandler object, which manages certificate validation
        //     for this UnityWebRequest.
        持有对CertificateHandler对象的引用,该对象管理证书验证为了这个UnityWebRequest。
        public CertificateHandler certificateHandler {
    
     get; set; }
        //
        // 摘要:
        //     Returns true after the UnityWebRequest has finished communicating with the remote
        //     server. (Read Only)
        UnityWebRequest完成与远程的通信后返回true服务器。(只读)
        public bool isDone {
    
     get; }
        //
        // 摘要:
        //     Sets UnityWebRequest to attempt to abort after the number of seconds in timeout
        //     have passed.
        设置UnityWebRequest在超时的秒数之后尝试中止已经过去了。
        public int timeout {
    
     get; set; }
        [Obsolete("UnityWebRequest.isError has been renamed to isNetworkError for clarity. (UnityUpgradable) -> isNetworkError", false)]
        是否有报错
        public bool isError {
    
     get; }

        //
        // 摘要:
        //     Clears stored cookies from the cache.
        清除缓存中存储的cookie。
        //
        // 参数:
        //   domain:
        //     An optional URL to define which cookies are removed. Only cookies that apply
        //     to this URL will be removed from the cache.
        一个可选的URL,用于定义删除哪些cookie。只应用cookie将从缓存中删除到此URL。
        public static void ClearCookieCache();
        public static void ClearCookieCache(Uri uri);
        public static UnityWebRequest Delete(Uri uri);
        //
        // 摘要:
        //     Creates a UnityWebRequest configured for HTTP DELETE.
        创建一个UnityWebRequest配置为HTTP删除。
        // 参数:
        //   uri:
        //     The URI to which a DELETE request should be sent.
        发送删除请求的URI。
        // 返回结果:
        //     A UnityWebRequest configured to send an HTTP DELETE request.
        配置为发送HTTP删除请求的UnityWebRequest。
        public static UnityWebRequest Delete(string uri);
        //
        // 摘要:
        //     Escapes characters in a string to ensure they are URL-friendly.
        转义字符串中的字符,以确保它们是url友好的。
        // 参数:
        //   s:
        //     A string with characters to be escaped.
        包含要转义的字符的字符串。
        //   e:
        //     The text encoding to use.
        要使用的文本编码。
        public static string EscapeURL(string s);
        //
        // 摘要:
        //     Escapes characters in a string to ensure they are URL-friendly.
        转义字符串中的字符,以确保它们是url友好的。
        //
        // 参数:
        //   s:
        //     A string with characters to be escaped.
        包含要转义的字符的字符串。
        //
        //   e:
        //     The text encoding to use.
         要使用的文本编码。
        public static string EscapeURL(string s, Encoding e);
        //
        // 摘要:
        //     Generate a random 40-byte array for use as a multipart form boundary.
        生成一个随机的40字节数组,用作多部分表单边界。
        //
        // 返回结果:
        //     40 random bytes, guaranteed to contain only printable ASCII values.
        40个随机字节,保证只包含可打印的ASCII值。
        public static byte[] GenerateBoundary();
        //
        // 摘要:
        //     Create a UnityWebRequest for HTTP GET.HTTP GET创建一个UnityWebRequest。
        //
        // 参数:
        //   uri:
        //     The URI of the resource to retrieve via HTTP GET.
        要通过HTTP GET检索的资源的URI。
        //
        // 返回结果:
        //     An object that retrieves data from the uri.
        从uri中检索数据的对象。
        public static UnityWebRequest Get(Uri uri);
        //
        // 摘要:
        //     Create a UnityWebRequest for HTTP GET.HTTP GET创建一个UnityWebRequest。
        // 参数:
        //   uri:
        //     The URI of the resource to retrieve via HTTP GET.
        要通过HTTP GET检索的资源的URI。
        //
        // 返回结果:
        //     An object that retrieves data from the uri.
        从uri中检索数据的对象。
        public static UnityWebRequest Get(string uri);
        [EditorBrowsable(EditorBrowsableState.Never)]
        [Obsolete("UnityWebRequest.GetAssetBundle is obsolete. Use UnityWebRequestAssetBundle.GetAssetBundle instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestAssetBundle.GetAssetBundle(*)", true)]
        public static UnityWebRequest GetAssetBundle(string uri);
        //
        // 摘要:
        //     Deprecated. Replaced by UnityWebRequestAssetBundle.GetAssetBundle.
        弃用。被UnityWebRequestAssetBundle.GetAssetBundle所取代。
        // 参数:
        //   uri:
        //
        //   crc:
        //
        //   version:
        //
        //   hash:
        //
        //   cachedAssetBundle:
        [EditorBrowsable(EditorBrowsableState.Never)]
        [Obsolete("UnityWebRequest.GetAssetBundle is obsolete. Use UnityWebRequestAssetBundle.GetAssetBundle instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestAssetBundle.GetAssetBundle(*)", true)]
        public static UnityWebRequest GetAssetBundle(string uri, CachedAssetBundle cachedAssetBundle, uint crc);
        //
        // 摘要:
        //     Deprecated. Replaced by UnityWebRequestAssetBundle.GetAssetBundle.
        弃用。被UnityWebRequestAssetBundle.GetAssetBundle所取代。
        //
        // 参数:
        //   uri:
        //
        //   crc:
        //
        //   version:
        //
        //   hash:
        //
        //   cachedAssetBundle:
        [EditorBrowsable(EditorBrowsableState.Never)]
        [Obsolete("UnityWebRequest.GetAssetBundle is obsolete. Use UnityWebRequestAssetBundle.GetAssetBundle instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestAssetBundle.GetAssetBundle(*)", true)]
        public static UnityWebRequest GetAssetBundle(string uri, uint version, uint crc);
        //
        // 摘要:
        //     Deprecated. Replaced by UnityWebRequestAssetBundle.GetAssetBundle.
        弃用。被UnityWebRequestAssetBundle.GetAssetBundle所取代。
        //
        // 参数:
        //   uri:
        //
        //   crc:
        //
        //   version:
        //
        //   hash:
        //
        //   cachedAssetBundle:
        [EditorBrowsable(EditorBrowsableState.Never)]
        [Obsolete("UnityWebRequest.GetAssetBundle is obsolete. Use UnityWebRequestAssetBundle.GetAssetBundle instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestAssetBundle.GetAssetBundle(*)", true)]
        public static UnityWebRequest GetAssetBundle(string uri, uint crc);
        //
        // 摘要:
        //     Deprecated. Replaced by UnityWebRequestAssetBundle.GetAssetBundle.
        弃用。被UnityWebRequestAssetBundle.GetAssetBundle所取代。
        //
        // 参数:
        //   uri:
        //
        //   crc:
        //
        //   version:
        //
        //   hash:
        //
        //   cachedAssetBundle:
        [EditorBrowsable(EditorBrowsableState.Never)]
        [Obsolete("UnityWebRequest.GetAssetBundle is obsolete. Use UnityWebRequestAssetBundle.GetAssetBundle instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestAssetBundle.GetAssetBundle(*)", true)]
        public static UnityWebRequest GetAssetBundle(string uri, Hash128 hash, uint crc);
        //
        // 摘要:
        //     OBSOLETE. Use UnityWebRequestMultimedia.GetAudioClip().
        过时了。使用UnityWebRequestMultimedia.GetAudioClip ()//
        // 参数:
        //   uri:
        //
        //   audioType:
        [EditorBrowsable(EditorBrowsableState.Never)]
        [Obsolete("UnityWebRequest.GetAudioClip is obsolete. Use UnityWebRequestMultimedia.GetAudioClip instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestMultimedia.GetAudioClip(*)", true)]
        public static UnityWebRequest GetAudioClip(string uri, AudioType audioType);
        //
        // 摘要:
        //     Creates a UnityWebRequest intended to download an image via HTTP GET and create
        //     a Texture based on the retrieved data.
        创建一个UnityWebRequest,用于通过HTTP GET和create下载图像基于检索到的数据的纹理。
        //
        // 参数:
        //   uri:
        //     The URI of the image to download.
        要下载的图像的URI。
        //   nonReadable:
        //     If true, the texture's raw data will not be accessible to script. This can conserve
        //     memory. Default: false.
        如果为真,脚本将无法访问纹理的原始数据。这可以节约内存。默认值:false//
        // 返回结果:
        //     A UnityWebRequest properly configured to download an image and convert it to
        //     a Texture.
        一个UnityWebRequest正确配置下载一个图像并转换它纹理。
        [EditorBrowsable(EditorBrowsableState.Never)]
        [Obsolete("UnityWebRequest.GetTexture is obsolete. Use UnityWebRequestTexture.GetTexture instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestTexture.GetTexture(*)", true)]
        public static UnityWebRequest GetTexture(string uri, bool nonReadable);
        //
        // 摘要:
        //     Creates a UnityWebRequest intended to download an image via HTTP GET and create
        //     a Texture based on the retrieved data.
        创建一个UnityWebRequest,用于通过HTTP GET和create下载图像基于检索到的数据的纹理。
        //
        // 参数:
        //   uri:
        //     The URI of the image to download.
        要下载的图像的URI。
        //
        //   nonReadable:
        //     If true, the texture's raw data will not be accessible to script. This can conserve
        //     memory. Default: false.
        如果为真,脚本将无法访问纹理的原始数据。这可以节约内存。默认值:false//
        // 返回结果:
        //     A UnityWebRequest properly configured to download an image and convert it to
        //     a Texture.
        一个UnityWebRequest正确配置下载一个图像并转换它内存。默认值:false[EditorBrowsable(EditorBrowsableState.Never)]
        [Obsolete("UnityWebRequest.GetTexture is obsolete. Use UnityWebRequestTexture.GetTexture instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestTexture.GetTexture(*)", true)]
        public static UnityWebRequest GetTexture(string uri);
        public static UnityWebRequest Head(Uri uri);
        //
        // 摘要:
        //     Creates a UnityWebRequest configured to send a HTTP HEAD request.
        创建一个UnityWebRequest配置发送一个HTTP头请求。
        //
        // 参数:
        //   uri:
        //     The URI to which to send a HTTP HEAD request.
        发送HTTP头请求的URI。
        //
        // 返回结果:
        //     A UnityWebRequest configured to transmit a HTTP HEAD request.
        一个UnityWebRequest配置来传输一个HTTP头请求。
        public static UnityWebRequest Head(string uri);
        public static UnityWebRequest Post(Uri uri, Dictionary<string, string> formFields);
        public static UnityWebRequest Post(Uri uri, List<IMultipartFormSection> multipartFormSections, byte[] boundary);
        public static UnityWebRequest Post(string uri, List<IMultipartFormSection> multipartFormSections, byte[] boundary);
        public static UnityWebRequest Post(Uri uri, List<IMultipartFormSection> multipartFormSections);
        public static UnityWebRequest Post(string uri, List<IMultipartFormSection> multipartFormSections);
        public static UnityWebRequest Post(Uri uri, WWWForm formData);
        //
        // 摘要:
        //     Create a UnityWebRequest configured to send form data to a server via HTTP POST.
        创建一个UnityWebRequest,配置为通过HTTP POST将表单数据发送到服务器。
        //
        // 参数:
        //   uri:
        //     The target URI to which form data will be transmitted.
        将向其传输表单数据的目标URI。
        //
        //   formData:
        //     Form fields or files encapsulated in a WWWForm object, for formatting and transmission
        //     to the remote server.
        封装在WWWForm对象中的表单字段或文件,用于格式化和传输到远程服务器。
        //
        // 返回结果:
        //     A UnityWebRequest configured to send form data to uri via POST.
        配置为通过POST将表单数据发送到uri的UnityWebRequest。
        public static UnityWebRequest Post(string uri, WWWForm formData);
        public static UnityWebRequest Post(Uri uri, string postData);
        //
        // 摘要:
        //     Creates a UnityWebRequest configured to send form data to a server via HTTP POST.
        创建一个UnityWebRequest,配置为通过HTTP POST将表单数据发送到服务器。
        //
        // 参数:
        //   uri:
        //     The target URI to which form data will be transmitted.
        将向其传输表单数据的目标URI。
        //
        //   postData:
        //     Form body data. Will be URLEncoded prior to transmission.
        形式的身体数据。将在传输之前进行编码。
        //
        // 返回结果:
        //     A UnityWebRequest configured to send form data to uri via POST.
        配置为通过POST将表单数据发送到uri的UnityWebRequest。
        public static UnityWebRequest Post(string uri, string postData);
        public static UnityWebRequest Post(string uri, Dictionary<string, string> formFields);
        //
        // 摘要:
        //     Creates a UnityWebRequest configured to upload raw data to a remote server via
        //     HTTP PUT.
        创建一个UnityWebRequest配置为上传原始数据到远程服务器通过 HTTP PUT。
        //
        // 参数:
        //   uri:
        //     The URI to which the data will be sent.
        将数据发送到的URI。
        //
        //   bodyData:
        //     The data to transmit to the remote server. If a string, the string will be converted
        //     to raw bytes via <a href="http:msdn.microsoft.comen-uslibrarysystem.text.encoding.utf8">System.Text.Encoding.UTF8<a>.
        要传输到远程服务器的数据。如果是字符串,则该字符串将被转换通过<a href="http:msdn.microsoft.comen- .uslibrarysystem.text.encoding.utf8">System.Text.Encoding.UTF8<a>.
        //
        // 返回结果:
        //     A UnityWebRequest configured to transmit bodyData to uri via HTTP PUT.
        配置为通过HTTP PUT将bodyData传输到uri的UnityWebRequest。
        public static UnityWebRequest Put(string uri, byte[] bodyData);
        //
        // 摘要:
        //     Creates a UnityWebRequest configured to upload raw data to a remote server via
        //     HTTP PUT.
        创建一个UnityWebRequest配置为上传原始数据到远程服务器通过HTTP PUT。
        //
        // 参数:
        //   uri:
        //     The URI to which the data will be sent.
        将数据发送到的URI。
        //
        //   bodyData:
        //     The data to transmit to the remote server. If a string, the string will be converted
        //     to raw bytes via <a href="http:msdn.microsoft.comen-uslibrarysystem.text.encoding.utf8">System.Text.Encoding.UTF8<a>.
        要传输到远程服务器的数据。如果是字符串,则该字符串将被转换通过<a href="http:msdn.microsoft.comen- .uslibrarysystem.text.encoding.utf8">System.Text.Encoding.UTF8<a>.
        //
        // 返回结果:
        //     A UnityWebRequest configured to transmit bodyData to uri via HTTP PUT.
        配置为通过HTTP PUT将bodyData传输到uri的UnityWebRequest。
        public static UnityWebRequest Put(string uri, string bodyData);
        public static UnityWebRequest Put(Uri uri, byte[] bodyData);
        public static UnityWebRequest Put(Uri uri, string bodyData);
        public static byte[] SerializeFormSections(List<IMultipartFormSection> multipartFormSections, byte[] boundary);
        public static byte[] SerializeSimpleForm(Dictionary<string, string> formFields);
        //
        // 摘要:
        //     Converts URL-friendly escape sequences back to normal text.
        将url友好的转义序列转换回正常文本。
        //
        // 参数:
        //   s:
        //     A string containing escaped characters.
        包含转义字符的字符串。
        //
        //   e:
        //     The text encoding to use.
        要使用的文本编码。
        public static string UnEscapeURL(string s, Encoding e);
        //
        // 摘要:
        //     Converts URL-friendly escape sequences back to normal text.
        将url友好的转义序列转换回正常文本。
        // 参数:
        //   s:
        //     A string containing escaped characters.
        包含转义字符的字符串。
        //
        //   e:
        //     The text encoding to use.
         要使用的文本编码。
        public static string UnEscapeURL(string s);
        //
        // 摘要:
        //     If in progress, halts the UnityWebRequest as soon as possible.
        如果正在进行中,请尽快停止UnityWebRequest。
        [NativeMethod(IsThreadSafe = true)]
        public void Abort();
        //
        // 摘要:
        //     Signals that this UnityWebRequest is no longer being used, and should clean up
        //     any resources it is using.
        表示UnityWebRequest不再被使用,需要清理它正在使用的任何资源。
        public void Dispose();
        //
        // 摘要:
        //     Retrieves the value of a custom request header.
        检索自定义请求标头的值。
        // 参数:
        //   name:
        //     Name of the custom request header. Case-insensitive.
        自定义请求头的名称。不区分大小写的。
        //
        // 返回结果:
        //     The value of the custom request header. If no custom header with a matching name
        //     has been set, returns an empty string.
        自定义请求头的值。如果没有匹配名称的自定义标题已设置,返回空字符串。
        public string GetRequestHeader(string name);
        //
        // 摘要:
        //     Retrieves the value of a response header from the latest HTTP response received.
        从收到的最新HTTP响应中检索响应标头的值。
        //
        // 参数:
        //   name:
        //     The name of the HTTP header to retrieve. Case-insensitive.
        要检索的HTTP头的名称。不区分大小写的。
        //
        // 返回结果:
        //     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.
        来自最新HTTP响应的HTTP标头的值。如果没有标题接收到匹配的名称,或者没有接收到响应,返回为空。
        public string GetResponseHeader(string name);
        //
        // 摘要:
        //     Retrieves a dictionary containing all the response headers received by this UnityWebRequest
        //     in the latest HTTP response.
        检索一个字典,其中包含这个UnityWebRequest接收到的所有响应标头在最新的HTTP响应中。
        // 返回结果:
        //     A dictionary containing all the response headers received in the latest HTTP
        //     response. If no responses have been received, returns null.
        包含在最新HTTP中接收到的所有响应标头的字典响应。如果没有收到任何响应,则返回nullpublic Dictionary<string, string> GetResponseHeaders();
        //
        // 摘要:
        //     Begin communicating with the remote server.
        开始与远程服务器通信。
        //
        // 返回结果:
        //     An AsyncOperation indicating the progress/completion state of the UnityWebRequest.
        //     Yield this object to wait until the UnityWebRequest is done.
        指示UnityWebRequest进程/完成状态的AsyncOperation。让这个对象等待UnityWebRequest完成。
        [Obsolete("Use SendWebRequest.  It returns a UnityWebRequestAsyncOperation which contains a reference to the WebRequest object.", false)]
        public AsyncOperation Send();
        //
        // 摘要:
        //     Begin communicating with the remote server.
        开始与远程服务器通信。
        public UnityWebRequestAsyncOperation SendWebRequest();
        //
        // 摘要:
        //     Set a HTTP request header to a custom value.
        将HTTP请求头设置为自定义值。
        //
        // 参数:
        //   name:
        //     The key of the header to be set. Case-sensitive.
        要设置的标题的键。区分大小写。
        //
        //   value:
        //     The header's intended value.
        标题的预期值。
        public void SetRequestHeader(string name, string value);
    }

猜你喜欢

转载自blog.csdn.net/LightHuiHui/article/details/102726891