abla/http/tls
Generated from source.
Import with import "abla/http/tls".
Source: abla/http/tls/entry.ab
httpsClient (fun)
fun httpsClient(
host: string,
port: int = 443,
maximumResponseBytes: int = 1048576,
timeoutMilliseconds: int = 5000,
// A limit on the whole exchange (0: none); see httpIpv4Client.
deadlineMilliseconds: int = 0
): HttpClient
Creates an HTTPS client for host and port with certificate and hostname verification. Sets the response byte cap, per-wait timeout, and optional whole-exchange deadline. Errors surface when sending.
httpsClientWithIdentityPem (fun)
fun httpsClientWithIdentityPem(
host: string,
certificatePem: string,
keyPem: string,
passphrase: string = "",
caPath: string = "",
port: int = 443,
maximumResponseBytes: int = 1048576,
timeoutMilliseconds: int = 5000,
deadlineMilliseconds: int = 0
): HttpClient
HTTPS clients that present a client certificate (mutual TLS), trusting the CA file at caPath if it isn't "". They keep the identity's bytes, and open them for each connection: a TlsClientIdentity has one owner, and a client's closure runs many times. A bad identity fails each send, and tlsLastError says so.
httpsClientWithIdentityPkcs12 (fun)
fun httpsClientWithIdentityPkcs12(
host: string,
der: string,
password: string,
caPath: string = "",
port: int = 443,
maximumResponseBytes: int = 1048576,
timeoutMilliseconds: int = 5000,
deadlineMilliseconds: int = 0
): HttpClient
Creates an HTTPS client that opens the PKCS#12 identity der with password per connection. Uses caPath when supplied, connects to host and port, and applies the response and time limits. Identity and transport failures surface when sending.
Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.