Skip to content

Commit 6b3406b

Browse files
Merge pull request #13 from dubit/dev_redirects
[Request] redirects limit
2 parents e0ac952 + 5f374bc commit 6b3406b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

HttpRequest.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ public HttpRequest Send()
9898
return this;
9999
}
100100

101+
public HttpRequest SetRedirectLimit(int redirectLimit)
102+
{
103+
UnityWebRequest.redirectLimit = redirectLimit;
104+
return this;
105+
}
106+
101107
public void Abort()
102108
{
103109
Http.Instance.Abort(this);

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ All these methods return the HttpRequest instance.
7272
##### Progress
7373
* `OnUploadProgress(Action<float> progress)`
7474
* `OnDownloadProgress(Action<float> progress)`
75+
##### Configure
76+
* `SetRedirectLimit(int redirectLimit)`
77+
78+
Redirect limit subject to Unity's documentation.
79+
* [Redirect Limit Documentation](https://docs.unity3d.com/ScriptReference/Networking.UnityWebRequest-redirectLimit.html)
7580

7681
Progress events will invoke each time the progress value has increased, they are subject to Unity's documentation.
7782
* [Upload Progress Documentation](https://docs.unity3d.com/ScriptReference/Networking.UnityWebRequest-uploadProgress.html)

0 commit comments

Comments
 (0)