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

Method post

src/launcher/default_executor.cpp:1530–1552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1528 }
1529
1530 Future<Response> post(
1531 Option<Connection> connection,
1532 const agent::Call& call)
1533 {
1534 ::Request request;
1535 request.method = "POST";
1536 request.url = agent;
1537 request.body = serialize(contentType, evolve(call));
1538 request.headers = {{"Accept", stringify(contentType)},
1539 {"Content-Type", stringify(contentType)}};
1540
1541 if (authorizationHeader.isSome()) {
1542 request.headers["Authorization"] = authorizationHeader.get();
1543 }
1544
1545 // Only pipeline requests when there is an active connection.
1546 if (connection.isSome()) {
1547 request.keepAlive = true;
1548 }
1549
1550 return connection.isSome() ? connection->send(request)
1551 : process::http::request(request);
1552 }
1553
1554 void retry(const id::UUID& _connectionId, const TaskID& taskId)
1555 {

Callers

nothing calls this directly

Calls 7

requestFunction · 0.85
sendMethod · 0.65
serializeFunction · 0.50
evolveFunction · 0.50
stringifyFunction · 0.50
isSomeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected