private void doCall(WebServiceParameters call, Action callback) { call.getParameters.Add("token", _token); new EditorWWWWaitUntil(call, (WebServiceReturnStatus status) => { if (status.httpErrorCode > 0 && status.httpErrorCode != 200) { EditorUtility.DisplayDialog("ERROR", "Error while ordering translation. Please try again.", "OK"); } if (callback != null) { callback(); } } ); }
private WebServiceReturnStatus doCall(WebServiceParameters call) { IWebService req = new SyncronousEditorWebRequest(); try { call.getParameters.Add("token", _token); WebServiceReturnStatus result = req.request(call); return(result); } catch (HttpErrorCode code) { Debug.Log(code.code + " http error"); throw; } }