From 7009ac21fd64ee80718e8eb206e9a893ac954591 Mon Sep 17 00:00:00 2001 From: Raycho Mukelov Date: Fri, 15 Sep 2023 21:07:54 +0300 Subject: [PATCH] Remove redundant file --- misc/http_client.nim | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 misc/http_client.nim diff --git a/misc/http_client.nim b/misc/http_client.nim deleted file mode 100644 index 2da6316..0000000 --- a/misc/http_client.nim +++ /dev/null @@ -1,30 +0,0 @@ -# nim-raft -# Copyright (c) 2023 Status Research & Development GmbH -# Licensed under either of -# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE)) -# * MIT license ([LICENSE-MIT](LICENSE-MIT)) -# at your option. -# This file may not be copied, modified, or distributed except according to -# those terms. - -import asyncdispatch, httpclient - -proc nonAsyncHttp() = - var client = newHttpClient() - echo "Non async started" - for i in 0 .. 30: - let resp = client.get("http://example.com") - echo resp.status - echo "Non async finished" - -proc asyncHttp() {.async.} = - var client = newAsyncHttpClient() - echo "Async started" - for i in 0 .. 30: - let resp = await client.get("http://example.com") - echo resp.status - echo "Async finished" - - -waitFor asyncHttp() -nonAsyncHttp()