Fired when a redirection is received from the server.
class WebFormRedirectEventParams(object): @property def location() -> str: ... @property def accept() -> bool: ... @accept.setter def accept(value) -> None: ... # In class WebForm: @property def on_redirect() -> Callable[[WebFormRedirectEventParams], None]: ... @on_redirect.setter def on_redirect(event_hook: Callable[[WebFormRedirectEventParams], None]) -> None: ...
This event is where the client can decide whether to continue with the redirection process or not. The Accept parameter is always true by default, but if you do not want to follow the redirection, Accept may be set to false, in which case the class fails with an error. Location is the location to which the client is being redirected. Further control over redirection is provided in the follow_redirects property.