Skip to content

Instantly share code, notes, and snippets.

@simdnyan
Last active June 20, 2016 15:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simdnyan/6dd91979740eca110d1aeb08d3f89878 to your computer and use it in GitHub Desktop.
Save simdnyan/6dd91979740eca110d1aeb08d3f89878 to your computer and use it in GitHub Desktop.
Dlang-requests response code 404 test
#!/usr/bin/env dub
/+ dub.sdl:
name "dlang_requests"
dependency "requests" version="~>0.1.8"
+/
import std.stdio;
import requests;
void main()
{
auto rs = Request().get("http://example.com/404");
writeln(rs.code);
writeln(rs.responseBody);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment