std.net.curl.CurlException Couldn't resolve host name on handle
Vino
akashvino79 at gmail.com
Fri Mar 13 18:10:51 UTC 2020
Hi All,
Request your help, the below code is fetching the required
data, after fetching the data at the end it throws the below
errors , hence request your help on how to handle this issue.
Code:
import std.net.curl, std.stdio, std.conv: to;
void main () {
auto http = HTTP();
http.handle.set(CurlOption.userpwd, "test:password");
http.handle.set(CurlOption.connecttimeout, 300);
http.handle.set(CurlOption.timeout, 600);
http.handle.set(CurlOption.tcp_nodelay, 1);
http.handle.set(CurlOption.buffersize,1073741824);
http.handle.set(CurlOption.url, "https://test:8130/sdata");
http.method(HTTP.Method.get);
auto content = http.perform();
http.shutdown;
foreach (line; byLine(to!string(content)))
writeln(line);
}
Error
std.net.curl.CurlException at std\net\curl.d(4364): Couldn't resolve
host name on handle BC9A90
----------------
0x004032AF
0x00403258
0x00408A34
0x00408890
0x00403F89
0x00403046
0x004023E8
0x0041A073
0x00419FED
0x00419E88
0x00413EBA
0x0040B18B
0x74EE6359 in BaseThreadInitThunk
0x77227B74 in RtlGetAppContainerNamedObjectPath
0x77227B44 in RtlGetAppContainerNamedObjectPath
From,
Vino.B
More information about the Digitalmars-d-learn
mailing list