Cleaned up http1-test.
This commit is contained in:
parent
bbd1c05e62
commit
49d0ebfed0
|
@ -1,8 +1,6 @@
|
||||||
/+ dub.sdl:
|
/+ dub.sdl:
|
||||||
dependency "handy-http-transport" path="../"
|
dependency "handy-http-transport" path="../"
|
||||||
dependency "requests" version="~>2.1"
|
dependency "requests" version="~>2.1"
|
||||||
dependency "streams" path="/home/andrew/Code/github-andrewlalis/streams"
|
|
||||||
dependency "slf4d" path="/home/andrew/Code/github-andrewlalis/slf4d"
|
|
||||||
+/
|
+/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,8 +32,9 @@ int main() {
|
||||||
thread.join();
|
thread.join();
|
||||||
}
|
}
|
||||||
info("Started server in another thread.");
|
info("Started server in another thread.");
|
||||||
Thread.sleep(msecs(100));
|
Thread.sleep(msecs(100)); // Wait for the server to start.
|
||||||
|
|
||||||
|
// Send a simple GET request to the server.
|
||||||
auto content = getContent("http://localhost:8080");
|
auto content = getContent("http://localhost:8080");
|
||||||
ubyte[] data = content.data;
|
ubyte[] data = content.data;
|
||||||
if (data.length != 13 || (cast(string) data) != "Hello, world!") {
|
if (data.length != 13 || (cast(string) data) != "Hello, world!") {
|
||||||
|
|
Loading…
Reference in New Issue