SecureBlackbox Lite 2020 Python Edition

Questions / Feedback?

on_redirection Event

Fires when the server suggests a redirect.

Syntax

class RESTClientRedirectionEventParams(object):
  @property
  def old_url() -> str: ...
  @property
  def new_url() -> str: ...
  @new_url.setter
  def new_url(value) -> None: ...
  @property
  def allow_redirection() -> bool: ...
  @allow_redirection.setter
  def allow_redirection(value) -> None: ...

# In class RESTClient:
@property
def on_redirection() -> Callable[[RESTClientRedirectionEventParams], None]: ...
@on_redirection.setter
def on_redirection(event_hook: Callable[[RESTClientRedirectionEventParams], None]) -> None: ...

Remarks

This event is fired when the server suggests a redirection request (typically via a 301 or 302 response). OldURL indicates the 'from' page, and NewURL indicates the 'to' one. The destination page can be altered by the application if needed. Use AllowRedirection to block undesirable redirects.

Generally, this is a notification event: the component handles redirections automatically. Use the MaxRedirections config property to limit the number of redirection hops.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox Lite 2020 Python Edition - Version 20.0 [Build 8166]