MCPcopy Create free account
hub / github.com/aria2/aria2 / performHttpRequest

Function performHttpRequest

test/HttpServerTest.cc:22–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20
21namespace {
22std::unique_ptr<HttpServer> performHttpRequest(SocketCore& server,
23 std::string request)
24{
25 auto endpoint = server.getAddrInfo();
26
27 SocketCore client;
28 client.establishConnection("localhost", endpoint.port);
29 while (!client.isWritable(0)) {
30 }
31
32 auto inbound = server.acceptConnection();
33 inbound->setBlockingMode();
34 auto rv = make_unique<HttpServer>(inbound);
35
36 client.writeData(request);
37 while (!rv->receiveRequest()) {
38 }
39 return rv;
40}
41} // namespace
42
43void HttpServerTest::testHttpBasicAuth()

Callers 1

testHttpBasicAuthMethod · 0.85

Calls 7

getAddrInfoMethod · 0.80
establishConnectionMethod · 0.80
isWritableMethod · 0.80
acceptConnectionMethod · 0.80
setBlockingModeMethod · 0.80
receiveRequestMethod · 0.80
writeDataMethod · 0.45

Tested by

no test coverage detected