From 6fa1f43b21b899ed1cb4bcb76b40be6e22833ef5 Mon Sep 17 00:00:00 2001 From: Tien Do Nam Date: Fri, 27 Sep 2024 16:01:49 +0200 Subject: [PATCH] docs: improve example --- benchmark/nodejs/hello.js | 2 +- rhttp/example/lib/dns_resolution.dart | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/benchmark/nodejs/hello.js b/benchmark/nodejs/hello.js index 85d5e84..c87ff96 100644 --- a/benchmark/nodejs/hello.js +++ b/benchmark/nodejs/hello.js @@ -18,7 +18,7 @@ const requestHandler = async (request, response) => { const server = http.createServer(requestHandler); server.listen(PORT, HOST, () => { - console.log(`Server listening on https://${HOST}:${PORT}`); + console.log(`Server listening on http://${HOST}:${PORT}`); }); function getBody(request) { diff --git a/rhttp/example/lib/dns_resolution.dart b/rhttp/example/lib/dns_resolution.dart index c904432..5c59207 100644 --- a/rhttp/example/lib/dns_resolution.dart +++ b/rhttp/example/lib/dns_resolution.dart @@ -40,10 +40,11 @@ class _MyAppState extends State { settings: ClientSettings( dnsSettings: DnsSettings.dynamic( resolver: (String host) async { - print('Resolving "$host"'); if (counter % 2 == 0) { + print('Resolving "$host" as localhost'); return ['127.0.0.1']; } else { + print('Resolving "$host" as example.com'); return ['93.184.215.14']; } }