William
William

Reputation: 1384

HTTPS with SSL Certificate in DART HTTP Server

Does the Dart HTTP Server support HTTPS? If so, how do you specify the certificate? If not, are there any alternatives such as community created packages?

Upvotes: 10

Views: 2894

Answers (1)

Florian Loitsch
Florian Loitsch

Reputation: 8128

Yes. Dart supports https.

See the documentation here and a test here.

Relevant lines:

HttpServer.bindSecure(HOST_NAME,
                      0,
                      backlog: 5,
                      certificateName: 'localhost_cert').then((server) {

Upvotes: 12

Related Questions