Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

httpclient.timeout not exported #10357

juancarlospaco opened this issue Jan 18, 2019 · 0 comments


None yet
2 participants
Copy link

commented Jan 18, 2019


httpclient is deprecating getContent and postContent,
those allowed very easy access to the timeout parameter,
so you can just set a long timeout for slow servers and a short timeout for fast servers,
without having to create several httpclients to do only 1 request each instead of just 1 and change its timeout, etc,
I can change stuff like headers because they are exported, but I can not change the timeout of an httpclient.
Other procs on httpclient dont have the timeout argument.
This is not a totally new feature, just is kinda private.


Please export httpclient.timeout.
So this is possible httpclient.timeout = 42.
Just a * on timeout should be enough (?)

The header already works like httpclient.headers = newHttpHeader(),
the point is to allow easy access to changing the timeout.

Additional Information

Nim Compiler Version 0.19.2 [Linux: amd64] at /home/juan/.nimble/bin/nim
nim> import httpclient
nim> var a = newHttpClient(timeout=2)
nim> a.timeout = 9
Error: attempting to call undeclared routine: 'timeout='


Change from:

timeout: int ## Only used for blocking HttpClient for now.


timeout*: int ## Only used for blocking HttpClient for now.


@Araq Araq closed this in #10618 Feb 10, 2019

Araq added a commit that referenced this issue Feb 10, 2019

Araq added a commit that referenced this issue Feb 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.