Files
2026-06-04 11:42:34 +02:00

895 lines
28 KiB
C#

using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using UnityEngine.Scripting;
using UnityEngineInternal;
namespace UnityEngine.Networking
{
// Token: 0x02000289 RID: 649
[StructLayout(LayoutKind.Sequential)]
public sealed class UnityWebRequest : IDisposable
{
// Token: 0x06002C83 RID: 11395 RVA: 0x0003DEE8 File Offset: 0x0003C0E8
public UnityWebRequest()
{
this.InternalCreate();
this.InternalSetDefaults();
}
// Token: 0x06002C84 RID: 11396 RVA: 0x0003DF00 File Offset: 0x0003C100
public UnityWebRequest(string url)
{
this.InternalCreate();
this.InternalSetDefaults();
this.url = url;
}
// Token: 0x06002C85 RID: 11397 RVA: 0x0003DF1C File Offset: 0x0003C11C
public UnityWebRequest(string url, string method)
{
this.InternalCreate();
this.InternalSetDefaults();
this.url = url;
this.method = method;
}
// Token: 0x06002C86 RID: 11398 RVA: 0x0003DF40 File Offset: 0x0003C140
public UnityWebRequest(string url, string method, DownloadHandler downloadHandler, UploadHandler uploadHandler)
{
this.InternalCreate();
this.InternalSetDefaults();
this.url = url;
this.method = method;
this.downloadHandler = downloadHandler;
this.uploadHandler = uploadHandler;
}
// Token: 0x06002C87 RID: 11399 RVA: 0x0003DF74 File Offset: 0x0003C174
public static UnityWebRequest Get(string uri)
{
return new UnityWebRequest(uri, "GET", new DownloadHandlerBuffer(), null);
}
// Token: 0x06002C88 RID: 11400 RVA: 0x0003DF9C File Offset: 0x0003C19C
public static UnityWebRequest Delete(string uri)
{
return new UnityWebRequest(uri, "DELETE");
}
// Token: 0x06002C89 RID: 11401 RVA: 0x0003DFC0 File Offset: 0x0003C1C0
public static UnityWebRequest Head(string uri)
{
return new UnityWebRequest(uri, "HEAD");
}
// Token: 0x06002C8A RID: 11402 RVA: 0x0003DFE4 File Offset: 0x0003C1E4
[Obsolete("UnityWebRequest.GetTexture is obsolete. Use UnityWebRequestTexture.GetTexture instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestTexture.GetTexture(*)", true)]
public static UnityWebRequest GetTexture(string uri)
{
throw new NotSupportedException("UnityWebRequest.GetTexture is obsolete. Use UnityWebRequestTexture.GetTexture instead.");
}
// Token: 0x06002C8B RID: 11403 RVA: 0x0003DFF4 File Offset: 0x0003C1F4
[Obsolete("UnityWebRequest.GetTexture is obsolete. Use UnityWebRequestTexture.GetTexture instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestTexture.GetTexture(*)", true)]
public static UnityWebRequest GetTexture(string uri, bool nonReadable)
{
throw new NotSupportedException("UnityWebRequest.GetTexture is obsolete. Use UnityWebRequestTexture.GetTexture instead.");
}
// Token: 0x06002C8C RID: 11404 RVA: 0x0003E004 File Offset: 0x0003C204
[Obsolete("UnityWebRequest.GetAudioClip is obsolete. Use UnityWebRequestMultimedia.GetAudioClip instead (UnityUpgradable) -> [UnityEngine] UnityWebRequestMultimedia.GetAudioClip(*)", true)]
public static UnityWebRequest GetAudioClip(string uri, AudioType audioType)
{
return null;
}
// Token: 0x06002C8D RID: 11405 RVA: 0x0003E01C File Offset: 0x0003C21C
public static UnityWebRequest GetAssetBundle(string uri)
{
return UnityWebRequest.GetAssetBundle(uri, 0U);
}
// Token: 0x06002C8E RID: 11406 RVA: 0x0003E038 File Offset: 0x0003C238
public static UnityWebRequest GetAssetBundle(string uri, uint crc)
{
return new UnityWebRequest(uri, "GET", new DownloadHandlerAssetBundle(uri, crc), null);
}
// Token: 0x06002C8F RID: 11407 RVA: 0x0003E064 File Offset: 0x0003C264
public static UnityWebRequest GetAssetBundle(string uri, uint version, uint crc)
{
return new UnityWebRequest(uri, "GET", new DownloadHandlerAssetBundle(uri, version, crc), null);
}
// Token: 0x06002C90 RID: 11408 RVA: 0x0003E090 File Offset: 0x0003C290
public static UnityWebRequest GetAssetBundle(string uri, Hash128 hash, uint crc)
{
return new UnityWebRequest(uri, "GET", new DownloadHandlerAssetBundle(uri, hash, crc), null);
}
// Token: 0x06002C91 RID: 11409 RVA: 0x0003E0BC File Offset: 0x0003C2BC
public static UnityWebRequest GetAssetBundle(string uri, CachedAssetBundle cachedAssetBundle, uint crc)
{
return new UnityWebRequest(uri, "GET", new DownloadHandlerAssetBundle(uri, cachedAssetBundle.name, cachedAssetBundle.hash, crc), null);
}
// Token: 0x06002C92 RID: 11410 RVA: 0x0003E0F4 File Offset: 0x0003C2F4
public static UnityWebRequest Put(string uri, byte[] bodyData)
{
return new UnityWebRequest(uri, "PUT", new DownloadHandlerBuffer(), new UploadHandlerRaw(bodyData));
}
// Token: 0x06002C93 RID: 11411 RVA: 0x0003E124 File Offset: 0x0003C324
public static UnityWebRequest Put(string uri, string bodyData)
{
return new UnityWebRequest(uri, "PUT", new DownloadHandlerBuffer(), new UploadHandlerRaw(Encoding.UTF8.GetBytes(bodyData)));
}
// Token: 0x06002C94 RID: 11412 RVA: 0x0003E15C File Offset: 0x0003C35C
public static UnityWebRequest Post(string uri, string postData)
{
UnityWebRequest unityWebRequest = new UnityWebRequest(uri, "POST");
byte[] array = null;
if (!string.IsNullOrEmpty(postData))
{
string text = WWWTranscoder.URLEncode(postData, Encoding.UTF8);
array = Encoding.UTF8.GetBytes(text);
}
unityWebRequest.uploadHandler = new UploadHandlerRaw(array);
unityWebRequest.uploadHandler.contentType = "application/x-www-form-urlencoded";
unityWebRequest.downloadHandler = new DownloadHandlerBuffer();
return unityWebRequest;
}
// Token: 0x06002C95 RID: 11413 RVA: 0x0003E1CC File Offset: 0x0003C3CC
public static UnityWebRequest Post(string uri, WWWForm formData)
{
UnityWebRequest unityWebRequest = new UnityWebRequest(uri, "POST");
byte[] array = null;
if (formData != null)
{
array = formData.data;
if (array.Length == 0)
{
array = null;
}
}
unityWebRequest.uploadHandler = new UploadHandlerRaw(array);
unityWebRequest.downloadHandler = new DownloadHandlerBuffer();
if (formData != null)
{
Dictionary<string, string> headers = formData.headers;
foreach (KeyValuePair<string, string> keyValuePair in headers)
{
unityWebRequest.SetRequestHeader(keyValuePair.Key, keyValuePair.Value);
}
}
return unityWebRequest;
}
// Token: 0x06002C96 RID: 11414 RVA: 0x0003E28C File Offset: 0x0003C48C
public static UnityWebRequest Post(string uri, List<IMultipartFormSection> multipartFormSections)
{
byte[] array = UnityWebRequest.GenerateBoundary();
return UnityWebRequest.Post(uri, multipartFormSections, array);
}
// Token: 0x06002C97 RID: 11415 RVA: 0x0003E2B0 File Offset: 0x0003C4B0
public static UnityWebRequest Post(string uri, List<IMultipartFormSection> multipartFormSections, byte[] boundary)
{
UnityWebRequest unityWebRequest = new UnityWebRequest(uri, "POST");
byte[] array = null;
if (multipartFormSections != null && multipartFormSections.Count != 0)
{
array = UnityWebRequest.SerializeFormSections(multipartFormSections, boundary);
}
unityWebRequest.uploadHandler = new UploadHandlerRaw(array)
{
contentType = "multipart/form-data; boundary=" + Encoding.UTF8.GetString(boundary, 0, boundary.Length)
};
unityWebRequest.downloadHandler = new DownloadHandlerBuffer();
return unityWebRequest;
}
// Token: 0x06002C98 RID: 11416 RVA: 0x0003E328 File Offset: 0x0003C528
public static UnityWebRequest Post(string uri, Dictionary<string, string> formFields)
{
UnityWebRequest unityWebRequest = new UnityWebRequest(uri, "POST");
byte[] array = null;
if (formFields != null && formFields.Count != 0)
{
array = UnityWebRequest.SerializeSimpleForm(formFields);
}
unityWebRequest.uploadHandler = new UploadHandlerRaw(array)
{
contentType = "application/x-www-form-urlencoded"
};
unityWebRequest.downloadHandler = new DownloadHandlerBuffer();
return unityWebRequest;
}
// Token: 0x06002C99 RID: 11417 RVA: 0x0003E388 File Offset: 0x0003C588
public static byte[] SerializeFormSections(List<IMultipartFormSection> multipartFormSections, byte[] boundary)
{
byte[] bytes = Encoding.UTF8.GetBytes("\r\n");
byte[] bytes2 = WWWForm.DefaultEncoding.GetBytes("--");
int num = 0;
foreach (IMultipartFormSection multipartFormSection in multipartFormSections)
{
num += 64 + multipartFormSection.sectionData.Length;
}
List<byte> list = new List<byte>(num);
foreach (IMultipartFormSection multipartFormSection2 in multipartFormSections)
{
string text = "form-data";
string sectionName = multipartFormSection2.sectionName;
string fileName = multipartFormSection2.fileName;
if (!string.IsNullOrEmpty(fileName))
{
text = "file";
}
string text2 = "Content-Disposition: " + text;
if (!string.IsNullOrEmpty(sectionName))
{
text2 = text2 + "; name=\"" + sectionName + "\"";
}
if (!string.IsNullOrEmpty(fileName))
{
text2 = text2 + "; filename=\"" + fileName + "\"";
}
text2 += "\r\n";
string contentType = multipartFormSection2.contentType;
if (!string.IsNullOrEmpty(contentType))
{
text2 = text2 + "Content-Type: " + contentType + "\r\n";
}
list.AddRange(bytes);
list.AddRange(bytes2);
list.AddRange(boundary);
list.AddRange(bytes);
list.AddRange(Encoding.UTF8.GetBytes(text2));
list.AddRange(bytes);
list.AddRange(multipartFormSection2.sectionData);
}
list.TrimExcess();
return list.ToArray();
}
// Token: 0x06002C9A RID: 11418 RVA: 0x0003E590 File Offset: 0x0003C790
public static byte[] GenerateBoundary()
{
byte[] array = new byte[40];
for (int i = 0; i < 40; i++)
{
int num = Random.Range(48, 110);
if (num > 57)
{
num += 7;
}
if (num > 90)
{
num += 6;
}
array[i] = (byte)num;
}
return array;
}
// Token: 0x06002C9B RID: 11419 RVA: 0x0003E5EC File Offset: 0x0003C7EC
public static byte[] SerializeSimpleForm(Dictionary<string, string> formFields)
{
string text = "";
foreach (KeyValuePair<string, string> keyValuePair in formFields)
{
if (text.Length > 0)
{
text += "&";
}
text = text + Uri.EscapeDataString(keyValuePair.Key) + "=" + Uri.EscapeDataString(keyValuePair.Value);
}
return Encoding.UTF8.GetBytes(text);
}
// Token: 0x17000A1B RID: 2587
// (get) Token: 0x06002C9C RID: 11420 RVA: 0x0003E698 File Offset: 0x0003C898
// (set) Token: 0x06002C9D RID: 11421 RVA: 0x0003E6B4 File Offset: 0x0003C8B4
public bool disposeDownloadHandlerOnDispose { get; set; }
// Token: 0x17000A1C RID: 2588
// (get) Token: 0x06002C9E RID: 11422 RVA: 0x0003E6C0 File Offset: 0x0003C8C0
// (set) Token: 0x06002C9F RID: 11423 RVA: 0x0003E6DC File Offset: 0x0003C8DC
public bool disposeUploadHandlerOnDispose { get; set; }
// Token: 0x06002CA0 RID: 11424
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern void InternalCreate();
// Token: 0x06002CA1 RID: 11425
[ThreadAndSerializationSafe]
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern void InternalDestroy();
// Token: 0x06002CA2 RID: 11426 RVA: 0x0003E6E8 File Offset: 0x0003C8E8
private void InternalSetDefaults()
{
this.disposeDownloadHandlerOnDispose = true;
this.disposeUploadHandlerOnDispose = true;
}
// Token: 0x06002CA3 RID: 11427 RVA: 0x0003E6FC File Offset: 0x0003C8FC
~UnityWebRequest()
{
this.DisposeHandlers();
this.InternalDestroy();
}
// Token: 0x06002CA4 RID: 11428 RVA: 0x0003E734 File Offset: 0x0003C934
public void Dispose()
{
this.DisposeHandlers();
this.InternalDestroy();
GC.SuppressFinalize(this);
}
// Token: 0x06002CA5 RID: 11429 RVA: 0x0003E74C File Offset: 0x0003C94C
private void DisposeHandlers()
{
if (this.disposeDownloadHandlerOnDispose)
{
DownloadHandler downloadHandler = this.GetDownloadHandler();
if (downloadHandler != null)
{
downloadHandler.Dispose();
}
}
if (this.disposeUploadHandlerOnDispose)
{
UploadHandler uploadHandler = this.GetUploadHandler();
if (uploadHandler != null)
{
uploadHandler.Dispose();
}
}
}
// Token: 0x06002CA6 RID: 11430
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern AsyncOperation InternalBegin();
// Token: 0x06002CA7 RID: 11431
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern void InternalAbort();
// Token: 0x06002CA8 RID: 11432 RVA: 0x0003E7A0 File Offset: 0x0003C9A0
public AsyncOperation Send()
{
return this.InternalBegin();
}
// Token: 0x06002CA9 RID: 11433 RVA: 0x0003E7BC File Offset: 0x0003C9BC
public void Abort()
{
this.InternalAbort();
}
// Token: 0x06002CAA RID: 11434
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern void InternalSetMethod(UnityWebRequest.UnityWebRequestMethod methodType);
// Token: 0x06002CAB RID: 11435
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern void InternalSetCustomMethod(string customMethodName);
// Token: 0x06002CAC RID: 11436
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern int InternalGetMethod();
// Token: 0x06002CAD RID: 11437
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern string InternalGetCustomMethod();
// Token: 0x17000A1D RID: 2589
// (get) Token: 0x06002CAE RID: 11438 RVA: 0x0003E7C8 File Offset: 0x0003C9C8
// (set) Token: 0x06002CAF RID: 11439 RVA: 0x0003E834 File Offset: 0x0003CA34
public string method
{
get
{
string text;
switch (this.InternalGetMethod())
{
case 0:
text = "GET";
break;
case 1:
text = "POST";
break;
case 2:
text = "PUT";
break;
case 3:
text = "HEAD";
break;
default:
text = this.InternalGetCustomMethod();
break;
}
return text;
}
set
{
if (string.IsNullOrEmpty(value))
{
throw new ArgumentException("Cannot set a UnityWebRequest's method to an empty or null string");
}
string text = value.ToUpper();
if (text != null)
{
if (text == "GET")
{
this.InternalSetMethod(UnityWebRequest.UnityWebRequestMethod.Get);
return;
}
if (text == "POST")
{
this.InternalSetMethod(UnityWebRequest.UnityWebRequestMethod.Post);
return;
}
if (text == "PUT")
{
this.InternalSetMethod(UnityWebRequest.UnityWebRequestMethod.Put);
return;
}
if (text == "HEAD")
{
this.InternalSetMethod(UnityWebRequest.UnityWebRequestMethod.Head);
return;
}
}
this.InternalSetCustomMethod(value.ToUpper());
}
}
// Token: 0x06002CB0 RID: 11440
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern int InternalGetError();
// Token: 0x17000A1E RID: 2590
// (get) Token: 0x06002CB1 RID: 11441
public extern string error
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
// Token: 0x17000A1F RID: 2591
// (get) Token: 0x06002CB2 RID: 11442
// (set) Token: 0x06002CB3 RID: 11443
public extern bool useHttpContinue
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
set;
}
// Token: 0x17000A20 RID: 2592
// (get) Token: 0x06002CB4 RID: 11444 RVA: 0x0003E8EC File Offset: 0x0003CAEC
// (set) Token: 0x06002CB5 RID: 11445 RVA: 0x0003E908 File Offset: 0x0003CB08
public string url
{
get
{
return this.InternalGetUrl();
}
set
{
string text = "http://localhost/";
this.InternalSetUrl(WebRequestUtils.MakeInitialUrl(value, text));
}
}
// Token: 0x06002CB6 RID: 11446
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private extern string InternalGetUrl();
// Token: 0x06002CB7 RID: 11447
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private extern void InternalSetUrl(string url);
// Token: 0x17000A21 RID: 2593
// (get) Token: 0x06002CB8 RID: 11448
public extern long responseCode
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
// Token: 0x17000A22 RID: 2594
// (get) Token: 0x06002CB9 RID: 11449
public extern float uploadProgress
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
// Token: 0x17000A23 RID: 2595
// (get) Token: 0x06002CBA RID: 11450
public extern bool isModifiable
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
// Token: 0x17000A24 RID: 2596
// (get) Token: 0x06002CBB RID: 11451
public extern bool isDone
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
// Token: 0x17000A25 RID: 2597
// (get) Token: 0x06002CBC RID: 11452
public extern bool isNetworkError
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
// Token: 0x17000A26 RID: 2598
// (get) Token: 0x06002CBD RID: 11453
public extern bool isHttpError
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
// Token: 0x17000A27 RID: 2599
// (get) Token: 0x06002CBE RID: 11454
public extern float downloadProgress
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
// Token: 0x17000A28 RID: 2600
// (get) Token: 0x06002CBF RID: 11455
public extern ulong uploadedBytes
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
// Token: 0x17000A29 RID: 2601
// (get) Token: 0x06002CC0 RID: 11456
public extern ulong downloadedBytes
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
}
// Token: 0x17000A2A RID: 2602
// (get) Token: 0x06002CC1 RID: 11457
// (set) Token: 0x06002CC2 RID: 11458
public extern int redirectLimit
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
set;
}
// Token: 0x17000A2B RID: 2603
// (get) Token: 0x06002CC3 RID: 11459
// (set) Token: 0x06002CC4 RID: 11460
public extern bool chunkedTransfer
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
set;
}
// Token: 0x06002CC5 RID: 11461
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public extern string GetRequestHeader(string name);
// Token: 0x06002CC6 RID: 11462
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern void InternalSetRequestHeader(string name, string value);
// Token: 0x06002CC7 RID: 11463 RVA: 0x0003E92C File Offset: 0x0003CB2C
public void SetRequestHeader(string name, string value)
{
if (string.IsNullOrEmpty(name))
{
throw new ArgumentException("Cannot set a Request Header with a null or empty name");
}
if (value == null)
{
throw new ArgumentException("Cannot set a Request header with a null");
}
this.InternalSetRequestHeader(name, value);
}
// Token: 0x06002CC8 RID: 11464
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
public extern string GetResponseHeader(string name);
// Token: 0x06002CC9 RID: 11465
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern string[] InternalGetResponseHeaderKeys();
// Token: 0x06002CCA RID: 11466 RVA: 0x0003E960 File Offset: 0x0003CB60
public Dictionary<string, string> GetResponseHeaders()
{
string[] array = this.InternalGetResponseHeaderKeys();
Dictionary<string, string> dictionary;
if (array == null)
{
dictionary = null;
}
else
{
Dictionary<string, string> dictionary2 = new Dictionary<string, string>(array.Length, StringComparer.OrdinalIgnoreCase);
for (int i = 0; i < array.Length; i++)
{
string responseHeader = this.GetResponseHeader(array[i]);
dictionary2.Add(array[i], responseHeader);
}
dictionary = dictionary2;
}
return dictionary;
}
// Token: 0x06002CCB RID: 11467
[ThreadAndSerializationSafe]
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private extern UploadHandler GetUploadHandler();
// Token: 0x17000A2C RID: 2604
// (get) Token: 0x06002CCC RID: 11468
// (set) Token: 0x06002CCD RID: 11469
public extern UploadHandler uploadHandler
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
set;
}
// Token: 0x06002CCE RID: 11470
[ThreadAndSerializationSafe]
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
private extern DownloadHandler GetDownloadHandler();
// Token: 0x17000A2D RID: 2605
// (get) Token: 0x06002CCF RID: 11471
// (set) Token: 0x06002CD0 RID: 11472
public extern DownloadHandler downloadHandler
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
set;
}
// Token: 0x17000A2E RID: 2606
// (get) Token: 0x06002CD1 RID: 11473
// (set) Token: 0x06002CD2 RID: 11474
public extern int timeout
{
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
get;
[GeneratedByOldBindingsGenerator]
[MethodImpl(MethodImplOptions.InternalCall)]
set;
}
// Token: 0x06002CD3 RID: 11475 RVA: 0x0003E9C8 File Offset: 0x0003CBC8
private static string GetErrorDescription(UnityWebRequest.UnityWebRequestError errorCode)
{
switch (errorCode)
{
case UnityWebRequest.UnityWebRequestError.OK:
return "No Error";
case UnityWebRequest.UnityWebRequestError.SDKError:
return "Internal Error With Transport Layer";
case UnityWebRequest.UnityWebRequestError.UnsupportedProtocol:
return "Specified Transport Protocol is Unsupported";
case UnityWebRequest.UnityWebRequestError.MalformattedUrl:
return "URL is Malformatted";
case UnityWebRequest.UnityWebRequestError.CannotResolveProxy:
return "Unable to resolve specified proxy server";
case UnityWebRequest.UnityWebRequestError.CannotResolveHost:
return "Unable to resolve host specified in URL";
case UnityWebRequest.UnityWebRequestError.CannotConnectToHost:
return "Unable to connect to host specified in URL";
case UnityWebRequest.UnityWebRequestError.AccessDenied:
return "Remote server denied access to the specified URL";
case UnityWebRequest.UnityWebRequestError.GenericHttpError:
return "Unknown/Generic HTTP Error - Check HTTP Error code";
case UnityWebRequest.UnityWebRequestError.WriteError:
return "Error when transmitting request to remote server - transmission terminated prematurely";
case UnityWebRequest.UnityWebRequestError.ReadError:
return "Error when reading response from remote server - transmission terminated prematurely";
case UnityWebRequest.UnityWebRequestError.OutOfMemory:
return "Out of Memory";
case UnityWebRequest.UnityWebRequestError.Timeout:
return "Timeout occurred while waiting for response from remote server";
case UnityWebRequest.UnityWebRequestError.HTTPPostError:
return "Error while transmitting HTTP POST body data";
case UnityWebRequest.UnityWebRequestError.SSLCannotConnect:
return "Unable to connect to SSL server at remote host";
case UnityWebRequest.UnityWebRequestError.Aborted:
return "Request was manually aborted by local code";
case UnityWebRequest.UnityWebRequestError.TooManyRedirects:
return "Redirect limit exceeded";
case UnityWebRequest.UnityWebRequestError.ReceivedNoData:
return "Received an empty response from remote host";
case UnityWebRequest.UnityWebRequestError.SSLNotSupported:
return "SSL connections are not supported on the local machine";
case UnityWebRequest.UnityWebRequestError.FailedToSendData:
return "Failed to transmit body data";
case UnityWebRequest.UnityWebRequestError.FailedToReceiveData:
return "Failed to receive response body data";
case UnityWebRequest.UnityWebRequestError.SSLCertificateError:
return "Failure to authenticate SSL certificate of remote host";
case UnityWebRequest.UnityWebRequestError.SSLCipherNotAvailable:
return "SSL cipher received from remote host is not supported on the local machine";
case UnityWebRequest.UnityWebRequestError.SSLCACertError:
return "Failure to authenticate Certificate Authority of the SSL certificate received from the remote host";
case UnityWebRequest.UnityWebRequestError.UnrecognizedContentEncoding:
return "Remote host returned data with an unrecognized/unparseable content encoding";
case UnityWebRequest.UnityWebRequestError.LoginFailed:
return "HTTP authentication failed";
case UnityWebRequest.UnityWebRequestError.SSLShutdownFailed:
return "Failure while shutting down SSL connection";
}
return "Unknown error";
}
// Token: 0x0400085F RID: 2143
[NonSerialized]
internal IntPtr m_Ptr;
// Token: 0x04000860 RID: 2144
public const string kHttpVerbGET = "GET";
// Token: 0x04000861 RID: 2145
public const string kHttpVerbHEAD = "HEAD";
// Token: 0x04000862 RID: 2146
public const string kHttpVerbPOST = "POST";
// Token: 0x04000863 RID: 2147
public const string kHttpVerbPUT = "PUT";
// Token: 0x04000864 RID: 2148
public const string kHttpVerbCREATE = "CREATE";
// Token: 0x04000865 RID: 2149
public const string kHttpVerbDELETE = "DELETE";
// Token: 0x0200028A RID: 650
internal enum UnityWebRequestMethod
{
// Token: 0x04000869 RID: 2153
Get,
// Token: 0x0400086A RID: 2154
Post,
// Token: 0x0400086B RID: 2155
Put,
// Token: 0x0400086C RID: 2156
Head,
// Token: 0x0400086D RID: 2157
Custom
}
// Token: 0x0200028B RID: 651
internal enum UnityWebRequestError
{
// Token: 0x0400086F RID: 2159
OK,
// Token: 0x04000870 RID: 2160
Unknown,
// Token: 0x04000871 RID: 2161
SDKError,
// Token: 0x04000872 RID: 2162
UnsupportedProtocol,
// Token: 0x04000873 RID: 2163
MalformattedUrl,
// Token: 0x04000874 RID: 2164
CannotResolveProxy,
// Token: 0x04000875 RID: 2165
CannotResolveHost,
// Token: 0x04000876 RID: 2166
CannotConnectToHost,
// Token: 0x04000877 RID: 2167
AccessDenied,
// Token: 0x04000878 RID: 2168
GenericHttpError,
// Token: 0x04000879 RID: 2169
WriteError,
// Token: 0x0400087A RID: 2170
ReadError,
// Token: 0x0400087B RID: 2171
OutOfMemory,
// Token: 0x0400087C RID: 2172
Timeout,
// Token: 0x0400087D RID: 2173
HTTPPostError,
// Token: 0x0400087E RID: 2174
SSLCannotConnect,
// Token: 0x0400087F RID: 2175
Aborted,
// Token: 0x04000880 RID: 2176
TooManyRedirects,
// Token: 0x04000881 RID: 2177
ReceivedNoData,
// Token: 0x04000882 RID: 2178
SSLNotSupported,
// Token: 0x04000883 RID: 2179
FailedToSendData,
// Token: 0x04000884 RID: 2180
FailedToReceiveData,
// Token: 0x04000885 RID: 2181
SSLCertificateError,
// Token: 0x04000886 RID: 2182
SSLCipherNotAvailable,
// Token: 0x04000887 RID: 2183
SSLCACertError,
// Token: 0x04000888 RID: 2184
UnrecognizedContentEncoding,
// Token: 0x04000889 RID: 2185
LoginFailed,
// Token: 0x0400088A RID: 2186
SSLShutdownFailed,
// Token: 0x0400088B RID: 2187
NoInternetConnection
}
}
}