MCPcopy Create free account
hub / github.com/chen3feng/toft / AppendHeaderToRequest

Function AppendHeaderToRequest

net/http/client.cpp:68–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68void AppendHeaderToRequest(const std::string& path,
69 const HttpHeaders& headers,
70 HttpRequest* request)
71{
72 size_t count = headers.Count();
73 for (size_t k = 0; k < count; ++k) {
74 std::pair<std::string, std::string> header;
75 headers.GetAt(k, &header);
76 request->AddHeader(header.first, header.second);
77 }
78}
79
80class DownloadTask {
81public:

Callers 1

ProcessRequestMethod · 0.85

Calls 3

AddHeaderMethod · 0.80
CountMethod · 0.45
GetAtMethod · 0.45

Tested by

no test coverage detected