MCPcopy Create free account
hub / github.com/apache/mesos / createRequest

Function createRequest

3rdparty/libprocess/src/http.cpp:2419–2444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2417
2418
2419Request createRequest(
2420 const URL& url,
2421 const string& method,
2422 const Option<Headers>& headers,
2423 const Option<string>& body,
2424 const Option<string>& contentType)
2425{
2426 Request request;
2427 request.method = method;
2428 request.url = url;
2429 request.keepAlive = false;
2430
2431 if (headers.isSome()) {
2432 request.headers = headers.get();
2433 }
2434
2435 if (body.isSome()) {
2436 request.body = body.get();
2437 }
2438
2439 if (contentType.isSome()) {
2440 request.headers["Content-Type"] = contentType.get();
2441 }
2442
2443 return request;
2444}
2445
2446
2447Request createRequest(

Callers 4

TEST_PFunction · 0.85
checkWithGetRequestMethod · 0.85
TEST_FFunction · 0.85
TYPED_TESTFunction · 0.85

Calls 4

IPClass · 0.50
joinFunction · 0.50
isSomeMethod · 0.45
getMethod · 0.45

Tested by 4

TEST_PFunction · 0.68
checkWithGetRequestMethod · 0.68
TEST_FFunction · 0.68
TYPED_TESTFunction · 0.68