SecureBlackbox 2020 Python Edition

Questions / Feedback?

on_custom_request Event

Reports a request of a non-standard type (method).

Syntax

class RESTServerCustomRequestEventParams(object):
  @property
  def connection_id() -> int: ...
  @property
  def uri() -> str: ...
  @property
  def http_method() -> str: ...
  @property
  def handled() -> bool: ...
  @handled.setter
  def handled(value) -> None: ...

# In class RESTServer:
@property
def on_custom_request() -> Callable[[RESTServerCustomRequestEventParams], None]: ...
@on_custom_request.setter
def on_custom_request(event_hook: Callable[[RESTServerCustomRequestEventParams], None]) -> None: ...

Remarks

The class fires this event to notify the application about a non-standard request received from the client. The HTTPMethod contains the non-standard HTTP method.

ConnectionID indicates the connection that sent the request and URI suggests the requested resource.

Set Handled to true to indicate that your application's code will take care of the request. The application does it by providing the necessary details via set_response_status, set_response_header, and set_response_file methods. If the returned value of Handled is false, the server will try to take care of the request automatically by searching for the requested resource in document_root.

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