Skip to main content

Send Signed Request

Description

Sends signed request.

Function Signature:

def send_signed_request(ws_config: WebServiceConfig, method: str, url: str, path: str, headers: Dict[str, str] | None = None, parameters: Dict[str, str] | None = None, body: str = '') -> 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] | None): HTTP headers for the request.
  • parameters (Dict[str, str] | None): Query-string parameters for the request.
  • body (str): Request body as a string.

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"
result = send_signed_request(ws_config, method, url, path, headers, parameters, body)
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.