Last active
June 20, 2016 15:55
-
-
Save simdnyan/6dd91979740eca110d1aeb08d3f89878 to your computer and use it in GitHub Desktop.
Dlang-requests response code 404 test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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