MCPcopy Create free account
hub / github.com/3rdparty/libprocess / request

Function request

src/http.cpp:2351–2369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2349
2350
2351Future<Response> request(const Request& request, bool streamedResponse)
2352{
2353 // We rely on the connection closing after the response.
2354 CHECK(!request.keepAlive);
2355
2356 return http::connect(request.url)
2357 .then([=](Connection connection) {
2358 Future<Response> response = connection.send(request, streamedResponse);
2359
2360 // This is a non Keep-Alive request which means the connection
2361 // will be closed when the response is received. Since the
2362 // 'Connection' is reference-counted, we must maintain a copy
2363 // until the disconnection occurs.
2364 connection.disconnected()
2365 .onAny([connection]() {});
2366
2367 return response;
2368 });
2369}
2370
2371
2372Future<Response> get(

Callers 4

getFunction · 0.85
postFunction · 0.85
requestDeleteFunction · 0.85
TEST_PFunction · 0.85

Calls 4

connectFunction · 0.70
thenMethod · 0.45
sendMethod · 0.45
disconnectedMethod · 0.45

Tested by 1

TEST_PFunction · 0.68