https://issues.dlang.org/show_bug.cgi?id=15040
Issue ID: 15040
Summary: showcase curl example doesn't run
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: minor
Priority: P1
Component: dlang.org
Assignee: [email protected]
Reporter: [email protected]
The sample program on the home page that demonstrates curl+json gives this
error message when the "Run" button is clicked:
Compilation output: (9 Killed)
This doesn't make a very good impression for a casual visitor.
========
// D is like...
pragma(lib, "curl");
import std.functional, std.json, std.net.curl, std.stdio;
alias getJSON = pipe!(get, parseJSON);
void main()
{
auto json = getJSON(
"itsthisforthat.com/api.php?json");
writefln("So, basically D is like a %s for %s",
json["this"].str, json["that"].str);
}
--