示例#1
0
 public AbstractHttpRequest(string url, string postData, bool isJsonPostData, bool cacheBust, float timeOutLimit, short retryLimit, OnGetRequestSuccessHandler onSuccessHandler, OnGetRequestFailedHandler onFailHandler)
 {
     _timeoutLimit   = timeOutLimit;
     _retryLimit     = retryLimit;
     _retryCount     = 1;
     _useBackoff     = true;
     _url            = url;
     _postData       = postData;
     _headers        = GetHeaders(cacheBust, isJsonPostData);
     _successHandler = onSuccessHandler;
     _failHandler    = onFailHandler;
     _requestType    = postData != null ? UnityWebRequest.kHttpVerbPOST : UnityWebRequest.kHttpVerbGET;
 }
示例#2
0
 public GetRequest(string url, bool cacheBust, float timeOutLimit, short retryLimit, OnGetRequestSuccessHandler onSuccessHandler, OnGetRequestFailedHandler onFailHandler)
     : base(url, null, false, cacheBust, timeOutLimit, retryLimit, onSuccessHandler, onFailHandler)
 {
 }
示例#3
0
 public static GetRequest CreateGetRequest(string url, bool cacheBust, float timeOutLimit, short retryLimit, OnGetRequestSuccessHandler onSuccessHandler, OnGetRequestFailedHandler onFailHandler)
 {
     return(new GetRequest(url, cacheBust, timeOutLimit, retryLimit, onSuccessHandler, onFailHandler));
 }
示例#4
0
 public static PostRequest CreatePostJSONRequest(string url, object postData, bool cacheBust, float timeOutLimit, short retryLimit, OnGetRequestSuccessHandler onSuccessHandler, OnGetRequestFailedHandler onFailHandler)
 {
     return(new PostRequest(url, TinyJSON.JSON.Dump(postData), true, cacheBust, timeOutLimit, retryLimit, onSuccessHandler, onFailHandler));
 }
示例#5
0
 public static PostRequest CreatePostRequest(string url, string postData, bool isJsonPostData, bool cacheBust, float timeOutLimit, short retryLimit, OnGetRequestSuccessHandler onSuccessHandler, OnGetRequestFailedHandler onFailHandler)
 {
     return(new PostRequest(url, postData, isJsonPostData, cacheBust, timeOutLimit, retryLimit, onSuccessHandler, onFailHandler));
 }
示例#6
0
 public PostRequest(string url, string postData, bool isJsonPostData, bool cacheBust, float timeOutLimit, short retryLimit, OnGetRequestSuccessHandler onSuccessHandler, OnGetRequestFailedHandler onFailHandler)
     : base(url, postData, isJsonPostData, cacheBust, timeOutLimit, retryLimit, onSuccessHandler, onFailHandler)
 {
 }