fix UnityWebRequestException String access is not supported #110
parent
42d627f3ba
commit
305c4aaa07
|
@ -33,7 +33,10 @@ namespace Cysharp.Threading.Tasks
|
|||
this.ResponseCode = unityWebRequest.responseCode;
|
||||
if (UnityWebRequest.downloadHandler != null)
|
||||
{
|
||||
this.Text = unityWebRequest.downloadHandler.text;
|
||||
if (unityWebRequest.downloadHandler is DownloadHandlerBuffer dhb)
|
||||
{
|
||||
this.Text = dhb.text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -476,8 +476,8 @@ public class SandboxMain : MonoBehaviour
|
|||
|
||||
async UniTaskVoid Start()
|
||||
{
|
||||
var url = "http://fooooooooooooooooooooooooooooooooooo.com";
|
||||
var webRequestAsyncOperation = UnityWebRequest.Head(url).SendWebRequest();
|
||||
var url = "http://google.com/404";
|
||||
var webRequestAsyncOperation = UnityWebRequest.Get(url).SendWebRequest();
|
||||
await webRequestAsyncOperation.ToUniTask();
|
||||
|
||||
//PlayerLoopInfo.Inject();
|
||||
|
|
Loading…
Reference in New Issue