Example #1
0
 public static wwHttpClient CreateUploadClient(string url, string uploadFile, int timeoutSeconds, wwHttpEvent.HttpVoidDelege timeoutCallback, wwHttpEvent.HttpVoidDelege errorCallback, wwHttpEvent.HttpVoidDelege successCallback)
 {
     //Uri uri = new Uri(url);
     wwHttpInfo httpInfo = new wwHttpInfo();
     httpInfo.url = url;
     httpInfo.uploadFile = uploadFile;
     httpInfo.timeoutSeconds = timeoutSeconds;
     httpInfo.timeoutDelege = timeoutCallback;
     httpInfo.successDelege = successCallback;
     httpInfo.errorDelege = errorCallback;
     wwHttpUploadFile client = new wwHttpUploadFile();
     client.httpInfo = httpInfo;
     return client;
 }
Example #2
0
 private void TestCallback(wwHttpInfo info)
 {
     wwDebug.Log("Callback  RESP CODE:" + info.resultCode);
     wwDebug.Log("Callback  RESP:" + info.responseData);
     wwDebug.Log("Callback  ERROR:" + info.www.error);
 }
Example #3
0
 public static wwHttpClient CreatePostClient(string url, string reqData, int timeoutSeconds, wwHttpEvent.HttpVoidDelege timeoutCallback, wwHttpEvent.HttpVoidDelege errorCallback, wwHttpEvent.HttpVoidDelege successCallback)
 {
     //Uri uri = new Uri(url);
     wwHttpInfo httpInfo = new wwHttpInfo();
     httpInfo.url = url;
     httpInfo.requestData = reqData;
     httpInfo.timeoutSeconds = timeoutSeconds;
     httpInfo.timeoutDelege = timeoutCallback;
     httpInfo.successDelege = successCallback;
     httpInfo.errorDelege = errorCallback;
     wwHttpPost client = new wwHttpPost();
     client.httpInfo = httpInfo;
     return client;
 }