HttpRequest.setMaximumNumberOfRedirects

Maximum number of redirections to follow (used only if followLocation is set to true). Will resolve with an error if a single request has more than this number of redirections. The default value is currently 10, but may change without notice. If you need a specific value, be sure to call this function.

If you want unlimited redirects, call it with int.max. If you set it to 0 but set followLocation to true, any attempt at redirection will abort the request. To disable automatically following redirection, set followLocation to false so you can process the 30x code yourself as a completed request.

class HttpRequest
void
setMaximumNumberOfRedirects
(
int max = 10
)

Meta

History

Added July 27, 2022 (dub v10.9)

Suggestion Box / Bug Report