Package-level declarations

Types

Link copied to clipboard
external class Agent : Agent

An Agent object for HTTPS similar to http.Agent. See {@link request} for more information.

Link copied to clipboard
sealed external interface AgentOptions : AgentOptions, ConnectionOptions
Link copied to clipboard
Link copied to clipboard

See http.Server for more information.

Properties

Link copied to clipboard
external var globalAgent: Agent

Functions

Link copied to clipboard
external fun <Request : IncomingMessage, Response : ServerResponse<*>> createServer(requestListener: RequestListener<Request, Response> = definedExternally): Server<Request, Response>

Or

external fun <Request : IncomingMessage, Response : ServerResponse<*>> createServer(options: ServerOptions<Request, Response>, requestListener: RequestListener<Request, Response> = definedExternally): Server<Request, Response>
Link copied to clipboard
external fun get(options: String, callback: (res: IncomingMessage) -> Unit = definedExternally): ClientRequest
external fun get(options: RequestOptions, callback: (res: IncomingMessage) -> Unit = definedExternally): ClientRequest
external fun get(options: URL, callback: (res: IncomingMessage) -> Unit = definedExternally): ClientRequest

Like http.get() but for HTTPS.

external fun get(url: String, options: RequestOptions, callback: (res: IncomingMessage) -> Unit = definedExternally): ClientRequest
external fun get(url: URL, options: RequestOptions, callback: (res: IncomingMessage) -> Unit = definedExternally): ClientRequest
Link copied to clipboard
external fun request(options: String, callback: (res: IncomingMessage) -> Unit = definedExternally): ClientRequest
external fun request(options: RequestOptions, callback: (res: IncomingMessage) -> Unit = definedExternally): ClientRequest
external fun request(options: URL, callback: (res: IncomingMessage) -> Unit = definedExternally): ClientRequest

Makes a request to a secure web server.

external fun request(url: String, options: RequestOptions, callback: (res: IncomingMessage) -> Unit = definedExternally): ClientRequest
external fun request(url: URL, options: RequestOptions, callback: (res: IncomingMessage) -> Unit = definedExternally): ClientRequest