digitalmars.D.learn - requests module generates " Can't parse uri '' "
- cartland (31/31) Nov 07 2019 First time D use :)
- Adam D. Ruppe (4/5) Nov 07 2019 What was your main() code?
- cartland (8/13) Nov 07 2019 import std.stdio;
- Adam D. Ruppe (8/9) Nov 07 2019 huh, idk, it works when I try that exact code in a fresh project
- cartland (6/11) Nov 07 2019 Thanks for checking. I'm not behind a proxy. The firewall allows
- ikod (4/9) Nov 08 2019 If you still stuck with this problem, you can post new issue on
- cartland (7/18) Nov 08 2019 Same on MacOS. Using dmd, ldc, or gdc. I'll raise an issue on
- cartland (2/8) Nov 08 2019 https://github.com/ikod/dlang-requests/issues/109
- cartland (3/12) Nov 09 2019 Figured it out. See github issue. I had http_proxy env var set to
- cartland (3/16) Nov 09 2019 PS. As a long time C (and C++, Java/script, C#) dev, I'm loving
- Adam D. Ruppe (4/5) Nov 09 2019 Hah, I called it!
- ikod (2/15) Nov 10 2019 Thanks for report, fixed in latest release.
First time D use :) After dub init, I used the example from https://code.dlang.org/packages/requests and ran "dub add requests" When I run dub, I get requests.uri.UriException /home/cartland/.dub/packages/requests-1.0.9/requests/source requests/uri.d(35): Can't parse uri '' Full output on initial run: Fetching vibe-core 1.7.0 (getting selected version)... Fetching requests 1.0.9 (getting selected version)... Fetching memutils 0.4.13 (getting selected version)... Fetching taggedalgebraic 0.11.7 (getting selected version)... Fetching vibe-d 0.8.6 (getting selected version)... Fetching botan-math 1.0.3 (getting selected version)... Fetching stdx-allocator 2.77.5 (getting selected version)... Fetching botan 1.12.10 (getting selected version)... Fetching diet-ng 1.6.0 (getting selected version)... Fetching openssl 1.1.6+1.0.1g (getting selected version)... Fetching cachetools 0.3.1 (getting selected version)... Fetching eventcore 0.8.48 (getting selected version)... Fetching mir-linux-kernel 1.0.1 (getting selected version)... Fetching libevent 2.0.2+2.0.16 (getting selected version)... Fetching libasync 0.8.4 (getting selected version)... Performing "debug" build using /home/cartland/dlang/dmd-2.089.0/linux/bin64/dmd for x86_64. cachetools 0.3.1: building configuration "library"... requests 1.0.9: building configuration "std"... x ~master: building configuration "application"... Linking... Running ./x requests.uri.UriException /home/cartland/.dub/packages/requests-1.0.9/requests/source requests/uri.d(35): Can't parse uri '' Program exited with code 1
Nov 07 2019
On Friday, 8 November 2019 at 03:29:41 UTC, cartland wrote:When I run dub, I getWhat was your main() code? The error makes me think you might have just tried like get("") or something
Nov 07 2019
On Friday, 8 November 2019 at 03:31:56 UTC, Adam D. Ruppe wrote:On Friday, 8 November 2019 at 03:29:41 UTC, cartland wrote:import std.stdio; import requests; void main() { auto content = getContent("https://httpbin.org/get", queryParams("name", "any name", "age", 42)); writeln(content); }When I run dub, I getWhat was your main() code? The error makes me think you might have just tried like get("") or something
Nov 07 2019
On Friday, 8 November 2019 at 03:36:22 UTC, cartland wrote:* snip *huh, idk, it works when I try that exact code in a fresh project dub init dub add requests dub run and it spat out the content... are you behind a proxy or something maybe?
Nov 07 2019
On Friday, 8 November 2019 at 03:43:52 UTC, Adam D. Ruppe wrote:On Friday, 8 November 2019 at 03:36:22 UTC, cartland wrote:Thanks for checking. I'm not behind a proxy. The firewall allows browsing to the url. Also tried older versions of requests with the same result. The same (similar) call works using std.net.curl. I'm on Tumbleweed. I'll try it on MacOS. And also try a different network a bit later.* snip *huh, idk, it works when I try that exact code in a fresh project* snip *are you behind a proxy or something maybe?
Nov 07 2019
On Friday, 8 November 2019 at 03:29:41 UTC, cartland wrote:First time D use :) After dub init, I used the example from https://code.dlang.org/packages/requests and ran "dub add requests" [...]If you still stuck with this problem, you can post new issue on github project page, I'll try to solve it. https://github.com/ikod/dlang-requests
Nov 08 2019
On Friday, 8 November 2019 at 17:01:07 UTC, ikod wrote:On Friday, 8 November 2019 at 03:29:41 UTC, cartland wrote:Same on MacOS. Using dmd, ldc, or gdc. I'll raise an issue on https://github.com/ikod/dlang-requests. Even this does it. import requests; void main() { }First time D use :) After dub init, I used the example from https://code.dlang.org/packages/requests and ran "dub add requests" [...]If you still stuck with this problem, you can post new issue on github project page, I'll try to solve it. https://github.com/ikod/dlang-requests
Nov 08 2019
On Saturday, 9 November 2019 at 00:53:13 UTC, cartland wrote:On Friday, 8 November 2019 at 17:01:07 UTC, ikod wrote: *snip* Even this does it. import requests; void main() { }https://github.com/ikod/dlang-requests/issues/109
Nov 08 2019
On Saturday, 9 November 2019 at 01:02:57 UTC, cartland wrote:On Saturday, 9 November 2019 at 00:53:13 UTC, cartland wrote:Figured it out. See github issue. I had http_proxy env var set to blank. Worked when I unset it.On Friday, 8 November 2019 at 17:01:07 UTC, ikod wrote: *snip* Even this does it. import requests; void main() { }https://github.com/ikod/dlang-requests/issues/109
Nov 09 2019
On Sunday, 10 November 2019 at 01:28:13 UTC, cartland wrote:On Saturday, 9 November 2019 at 01:02:57 UTC, cartland wrote:D. Very impressive so far.On Saturday, 9 November 2019 at 00:53:13 UTC, cartland wrote:Figured it out. See github issue. I had http_proxy env var set to blank. Worked when I unset it.On Friday, 8 November 2019 at 17:01:07 UTC, ikod wrote: *snip* Even this does it. import requests; void main() { }https://github.com/ikod/dlang-requests/issues/109
Nov 09 2019
On Sunday, 10 November 2019 at 01:28:13 UTC, cartland wrote:I had http_proxy env var set to blank. Worked when I unset it.Hah, I called it! But I didn't realize an env var would do it with blank. That's kinda crazy, the code should prolly check that; I'd call it a bug.
Nov 09 2019
On Sunday, 10 November 2019 at 01:28:13 UTC, cartland wrote:On Saturday, 9 November 2019 at 01:02:57 UTC, cartland wrote:Thanks for report, fixed in latest release.On Saturday, 9 November 2019 at 00:53:13 UTC, cartland wrote:Figured it out. See github issue. I had http_proxy env var set to blank. Worked when I unset it.On Friday, 8 November 2019 at 17:01:07 UTC, ikod wrote: *snip* Even this does it. import requests; void main() { }https://github.com/ikod/dlang-requests/issues/109
Nov 10 2019