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; }
public GetRequest(string url, bool cacheBust, float timeOutLimit, short retryLimit, OnGetRequestSuccessHandler onSuccessHandler, OnGetRequestFailedHandler onFailHandler) : base(url, null, false, cacheBust, timeOutLimit, retryLimit, onSuccessHandler, onFailHandler) { }
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)); }
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)); }
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)); }
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) { }