From c67c00da88a1eca120e2fb42adb58c3188b2ec20 Mon Sep 17 00:00:00 2001 From: Harry Hodgson Date: Wed, 7 Nov 2018 17:32:47 +0000 Subject: [PATCH 1/4] Added a SetRedirectLimit method --- HttpRequest.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/HttpRequest.cs b/HttpRequest.cs index ac58cfd..e7ec7b8 100644 --- a/HttpRequest.cs +++ b/HttpRequest.cs @@ -98,6 +98,17 @@ public HttpRequest Send() return this; } + /// + /// disable = 0 + /// infinite = negative value + /// limit = positive value + /// + public HttpRequest SetRedirectLimit(int redirectLimit) + { + UnityWebRequest.redirectLimit = redirectLimit; + return this; + } + public void Abort() { Http.Instance.Abort(this); From 5c7673aee6a530df94902b437297403204bd8a8f Mon Sep 17 00:00:00 2001 From: Harry Hodgson Date: Wed, 7 Nov 2018 17:33:04 +0000 Subject: [PATCH 2/4] Updated the readme with SetRedirectLimit --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8e3fb40..7417da0 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,8 @@ All these methods return the HttpRequest instance. ##### Progress * `OnUploadProgress(Action progress)` * `OnDownloadProgress(Action progress)` +##### Configure +* `SetRedirectLimit(int redirectLimit)` Progress events will invoke each time the progress value has increased, they are subject to Unity's documentation. * [Upload Progress Documentation](https://docs.unity3d.com/ScriptReference/Networking.UnityWebRequest-uploadProgress.html) From 3b529c7bdb8dd9822ccf0fd560be7defec659494 Mon Sep 17 00:00:00 2001 From: Harry Hodgson Date: Wed, 7 Nov 2018 17:42:53 +0000 Subject: [PATCH 3/4] Removed summary --- HttpRequest.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/HttpRequest.cs b/HttpRequest.cs index e7ec7b8..64a88df 100644 --- a/HttpRequest.cs +++ b/HttpRequest.cs @@ -98,11 +98,6 @@ public HttpRequest Send() return this; } - /// - /// disable = 0 - /// infinite = negative value - /// limit = positive value - /// public HttpRequest SetRedirectLimit(int redirectLimit) { UnityWebRequest.redirectLimit = redirectLimit; From 5f374bcde3d0de96fb641c6ca405104c61f8c94d Mon Sep 17 00:00:00 2001 From: Harry Hodgson Date: Wed, 7 Nov 2018 17:44:19 +0000 Subject: [PATCH 4/4] Added documentation for Unity's redirect limit --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 7417da0..9eab863 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,9 @@ All these methods return the HttpRequest instance. ##### Configure * `SetRedirectLimit(int redirectLimit)` +Redirect limit subject to Unity's documentation. +* [Redirect Limit Documentation](https://docs.unity3d.com/ScriptReference/Networking.UnityWebRequest-redirectLimit.html) + Progress events will invoke each time the progress value has increased, they are subject to Unity's documentation. * [Upload Progress Documentation](https://docs.unity3d.com/ScriptReference/Networking.UnityWebRequest-uploadProgress.html) * [Download Progress Documentation](https://docs.unity3d.com/ScriptReference/Networking.UnityWebRequest-downloadProgress.html)