[Issue 15040] New: showcase curl example doesn't run

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Sep 11 09:19:53 PDT 2015


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: nobody at puremagic.com
          Reporter: jansen.gerald at gmail.com

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);
}

--


More information about the Digitalmars-d-bugs mailing list