public Int64 Get(string url, HTTP_CALLBACK callback) { var id = ++m_Id; StartCoroutine(this._get(id, url, callback)); return(id); }
private IEnumerator _get(Int64 id, string url, HTTP_CALLBACK callback) { UnityWebRequest getData = UnityWebRequest.Get(url); getData.certificateHandler = new SkipCertificateHandler();; yield return(getData.SendWebRequest()); if (getData.isHttpError || getData.isNetworkError) { Info.Error("HttpManager get error! " + url); callback(id, HttpState.Failed, getData.error); } else { callback(id, HttpState.Complete, getData.downloadHandler.text); } }