Skip to main content

ntex automatically upgrades connections to HTTP/2 if possible.

Negotiation

When either of the rustls or openssl features are enabled, HttpServer provides the bind_rustls method and bind_openssl methods, respectively.

[dependencies]
ntex = { version = "2.0", features = ["tokio", "openssl"] }
openssl = { version = "0.10", features = ["v110", "vendored"] }

Upgrades to HTTP/2 described in RFC 7540 §3.2 are not supported. Starting HTTP/2 with prior knowledge is supported for both cleartext and TLS connections (RFC 7540 §3.4) (when using the lower level ntex service builders).

Check out the examples for concrete example.