httpCreateClient (Function)

Signature: httpCreateClient(base_url: string, timeout: int) -> int

Description: Creates an HTTP client and returns its handle, or a negative runtime error.

Parameters

  • base_url (string): Base URL for requests (e.g., "http://api.example.com")
  • timeout (int): Request timeout in milliseconds

Returns: int

Example

let clientId = httpCreateClient("http://httpbin.org", 5000)
print("Client created")
clientId = httpCreateClient ("http://httpbin.org", 5000)
print "Client created"