Module
http
Module http
Definitions
tharmigank/http
0.6.0
Overview
This is a mock HTTP package
Functions
getDefaultListener
Isolated Function
function getDefaultListener() returns Listener|ListenerError
Returns the default HTTP listener. If the default listener is not already created, a new listener will be created with the default port and configuration. An error will be returned if the listener creation fails.
The default listener configuration can be changed in the Config.toml
file. Example:
[ballerina.http] defaultListenerPort = 8080 [ballerina.http.defaultListenerConfig] httpVersion = "1.1" [ballerina.http.defaultListenerConfig.secureSocket.key] path = "resources/certs/key.pem" password = "password"
Return Type
- Listener|ListenerError - The default HTTP listener or an error if the listener creation fails.
Configurables
http: defaultListenerPort
Default HTTP listener port used by the HTTP Default Listener. The default value is 9090.
http: defaultListenerConfig
Default HTTP listener configuration used by the HTTP Default Listener.
Import
import tharmigank/http;
Metadata
Released date: 3 months ago
Version: 0.6.0
Compatibility
Platform: any
Ballerina version: 2201.10.3
GraalVM compatible: Yes
Pull count
Total: 4
Current verison: 1
Weekly downloads
Dependencies