Signature: httpListen(serverID: int, handler: (string, string, string, string) -> HttpResponse) -> int
Description: Starts the HTTP server listening for requests with a handler function.
Parameters #
- serverID (int): Server identifier from httpCreateServer
- handler ((string, string, string, string) -> HttpResponse): Request handler function
Returns: int
Example #
let result = httpListen(serverId, requestHandler)
print("Server listening")