How to make a HTTP request in Nim?
This is answered in the first couple of lines of the httpclient documentation, along with POST, file POST, SSL, Proxy, timeouts and redirect handling...
Sync:
import std/httpclient
var client = newHttpClient()
echo client.getContent("http://google.com")
Async:
import std/[asyncdispatch, httpclient]
proc asyncProc(): Future[string] {.async.} =
var client = newAsyncHttpClient()
return await client.getContent("http://example.com")
echo waitFor asyncProc()