Function SetHeaders

Synopsis

#include <include/restclient-cpp/connection.h>

void SetHeaders(RestClient::HeaderFields headers)

Description

set headers

set the custom headers map. This will replace the currently configured headers with the provided ones. If you want to add additional headers, use AppendHeader()

Parameters

headers - to set

Mentioned in

Source

Lines 121-128 in source/connection.cc. Line 216 in include/restclient-cpp/connection.h.

void
RestClient::Connection::SetHeaders(RestClient::HeaderFields headers) {
#if __cplusplus >= 201103L
  this->headerFields = std::move(headers);
#else
  this->headerFields = headers;
#endif
}





Add Discussion as Guest

Log in