I just wanted to get the contents of a smiple html page using std.net.curl (on Windows)

So I did (exactly like in the library documentation example)

string contents = get("dlang.org");

But this won't even compile, not with dmd 2.062 and not with 2.063

main.d(8): Error: cannot implicitly convert expression (get("dlang.org", AutoProtocol())) of type char[] to string C:\digital-mars\dmd2-63\windows\bin\..\..\src\phobos\std\range.d(611): Error: static assert "Cannot put a const(dchar)
into a Appender!(char[])"
C:\digital-mars\dmd2-63\windows\bin\..\..\src\phobos\std\format.d(2160):
instantiated from here: put!(Appender!(char[]), const(dchar))
C:\digital-mars\dmd2-63\windows\bin\..\..\src\phobos\std\format.d(2207):
instantiated from here: formatChar!(Appender!(char[]))
C:\digital-mars\dmd2-63\windows\bin\..\..\src\phobos\std\typecons.d(581):
instantiated from here: formatElement!(Appender!(string), char[], char)
C:\digital-mars\dmd2-63\windows\bin\..\..\src\phobos\std\net\curl.d(1873): ... (4 instantiations, -v to show) ... C:\digital-mars\dmd2-63\windows\bin\..\..\src\phobos\std\net\curl.d(374):
instantiated from here: get!(FTP, char)
main.d(8):
instantiated from here: get!(AutoProtocol, char)


Are the exampels not tested? What is wrong here?

Kind Regards
Benjamin Thaut

Reply via email to