Skip to content

Instantly share code, notes, and snippets.

Created February 19, 2018 23:27
Show Gist options
  • Save anonymous/d23f57b5526bc4e63d476c0744605c94 to your computer and use it in GitHub Desktop.
Save anonymous/d23f57b5526bc4e63d476c0744605c94 to your computer and use it in GitHub Desktop.
import httpclient
var client = newHttpClient()
let url = "https://github.com/StevenBlack/hosts/blob/master/hosts?raw=true"
client.downloadFile(url, "foo")
discard """
bug.nim(5) bug
httpclient.nim(1296) downloadFile
httpclient.nim(1226) get
httpclient.nim(1218) request
httpclient.nim(1201) request
httpclient.nim(1195) request
httpclient.nim(1180) requestAux
httpclient.nim(1039) parseResponse
httpclient.nim(226) httpError
Error: unhandled exception: invalid http version, 0x7f807f99e2d8"77" [ProtocolError]
Error: execution of an external program failed: '/home/david/t/bug '
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment