Ejemplo n.º 1
0
    public static wwHttpClient CreateHttpRequest(string url, string reqData, int timeoutSeconds, wwHttpEvent.HttpVoidDelege timeoutCallback, wwHttpEvent.HttpVoidDelege errorCallback, wwHttpEvent.HttpVoidDelege successCallback)
    {
        if (instance == null)
        {
            wwDebug.LogWarning("wwHttpManager not instantiate");
            return null;
        }

        wwHttpClient client = CreatePostClient( url, reqData, timeoutSeconds, timeoutCallback, errorCallback, successCallback);
        return client;
    }
Ejemplo n.º 2
0
 public static wwHttpClient CreateHttpRequest(string url, wwHttpEvent.HttpVoidDelege callback)
 {
     return CreateHttpRequest(url, null, CONNECT_TIMEOUT, callback, callback, callback);
 }
Ejemplo n.º 3
0
 public static wwHttpClient CreateHttpRequest(string url, string reqData, int timeoutSeconds, wwHttpEvent.HttpVoidDelege callback)
 {
     return CreateHttpRequest(url, reqData, timeoutSeconds, callback, callback, callback);
 }
Ejemplo n.º 4
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;
 }
Ejemplo n.º 5
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;
 }
Ejemplo n.º 6
0
 public static wwHttpClient CreateUpdFileRequest(string url, string uploadFile, wwHttpEvent.HttpVoidDelege callback)
 {
     return CreateUpdFileRequest(url, uploadFile, CONNECT_TIMEOUT, callback, callback, callback);
 }
Ejemplo n.º 7
0
 public static wwHttpClient CreateUpdFileRequest(string url, string uploadFile, int timeoutSeconds, wwHttpEvent.HttpVoidDelege callback)
 {
     return CreateUpdFileRequest(url, uploadFile, timeoutSeconds, callback, callback, callback);
 }