shouldFollowRedirect

open override fun shouldFollowRedirect(request: NetworkRequest, fromUrl: String, toUrl: String): Boolean

Decide whether to follow a redirect on the client's executor.

Return

true to follow the redirect or false to fail the request.

Parameters

request

The original request, including its headers and body.

fromUrl

The URL that returned this redirect.

toUrl

The redirect destination reported by HttpEngine.