[Issue 23724] New: HTTP.onReceive example does not compile
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Feb 17 22:50:39 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23724
Issue ID: 23724
Summary: HTTP.onReceive example does not compile
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: snarwin+bugzilla at gmail.com
The following example from the documentation of std.net.curl.HTTP.onReceive
does not compile:
---
import std.net.curl, std.stdio;
auto client = HTTP("dlang.org");
client.onReceive = (ubyte[] data)
{
writeln("Got data", to!(const(char)[])(data));
return data.length;
};
client.perform();
---
The error message is:
---
Error: template instance `to!(const(char)[])` template `to` is not defined
---
--
More information about the Digitalmars-d-bugs
mailing list