From 6a37e4426e686028c38d5e915d91e587c5966804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Fri, 24 Apr 2020 23:29:14 +0200 Subject: BREAKING CHANGE: rename TLS APIs to camel case (#4888) This commit renames all APIs containing "TLS" to use camel case (connectTLS -> connectTls, etc.) --- std/http/server.ts | 8 ++++---- std/http/server_test.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'std/http') diff --git a/std/http/server.ts b/std/http/server.ts index 4fbd6f9c9..79d83129d 100644 --- a/std/http/server.ts +++ b/std/http/server.ts @@ -13,7 +13,7 @@ import { import Listener = Deno.Listener; import Conn = Deno.Conn; import Reader = Deno.Reader; -const { listen, listenTLS } = Deno; +const { listen, listenTls } = Deno; export class ServerRequest { url!: string; @@ -286,7 +286,7 @@ export async function listenAndServe( } /** Options for creating an HTTPS server. */ -export type HTTPSOptions = Omit; +export type HTTPSOptions = Omit; /** * Create an HTTPS server with given options @@ -306,11 +306,11 @@ export type HTTPSOptions = Omit; * @return Async iterable server instance for incoming requests */ export function serveTLS(options: HTTPSOptions): Server { - const tlsOptions: Deno.ListenTLSOptions = { + const tlsOptions: Deno.ListenTlsOptions = { ...options, transport: "tcp", }; - const listener = listenTLS(tlsOptions); + const listener = listenTls(tlsOptions); return new Server(listener); } diff --git a/std/http/server_test.ts b/std/http/server_test.ts index 12849d6e7..d08c352c2 100644 --- a/std/http/server_test.ts +++ b/std/http/server_test.ts @@ -423,7 +423,7 @@ test({ "server must be started" ); // Requests to the server and immediately closes the connection - const conn = await Deno.connectTLS({ + const conn = await Deno.connectTls({ hostname: "localhost", port: 4503, certFile: "http/testdata/tls/RootCA.pem", -- cgit v1.2.3