MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / build_header_list

Method build_header_list

extensions/http-curl/client/HTTPClient.cpp:201–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201struct curl_slist *HTTPClient::build_header_list(std::string regex, const std::map<std::string, std::string> &attributes) {
202 if (http_session_) {
203 for (auto attribute : attributes) {
204 if (matches(attribute.first, regex)) {
205 std::string attr = attribute.first + ":" + attribute.second;
206 headers_ = curl_slist_append(headers_, attr.c_str());
207 }
208 }
209 }
210 return headers_;
211}
212
213void HTTPClient::setContentType(std::string content_type) {
214 content_type_ = "Content-Type: " + content_type;

Callers 1

onTriggerMethod · 0.80

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected