Skip to main content

Send Signed Request Long Poll

Description

Send a signed HTTP request with optional long polling support.

Function Signature:

def send_signed_request_long_poll(ws_config: WebServiceConfig, method: str, url: str, path: str, headers: Dict[str, str] = {}, parameters: Dict[str, str] = {}, body: str = '', long_polling: bool = False, long_polling_timeout: int = 62) -> Result.StandardResult:

Parameters

  • ws_config (WebServiceConfig): Configuration for the web service connection.
  • method (str): HTTP method (GET, POST, etc.).
  • url (str): Request URL.
  • path (str): Request path (relative to base URL).
  • headers (Dict[str, str]): HTTP headers for the request.
  • parameters (Dict[str, str]): Query-string parameters for the request.
  • body (str): Request body as a string.
  • long_polling (bool): Input value for long_polling.
  • long_polling_timeout (int): Input value for long_polling_timeout.

Returns

  • Result.StandardResult: Return value from the function.

Example Usage

# Example usage
ws_config = WebServiceConfig(access_key="key", secret_key="secret", base_url="https://api.example.com/")
method = "example"
url = "example"
path = "example"
headers = "example"
parameters = "example"
body = "example"
long_polling = False
long_polling_timeout = 1
result = send_signed_request_long_poll(ws_config, method, url, path, headers, parameters, body, long_polling, long_polling_timeout)
print(result)

Behavior

  • Executes the function logic with the provided arguments.
  • On success, returns the computed value or result object.

Error Handling

  • Exceptions are handled within the function where implemented.