Function SetUserAgent

Synopsis

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

void SetUserAgent(const std::string &userAgent)

Description

set custom user agent for connection. This gets prepended to the default restclient-cpp/RESTCLIENT_VERSION string

set custom user agent (this will result in the UA "foo/cool restclient-cpp/VERSION")

Parameters

userAgent - - custom userAgent prefix

Mentioned in

Source

Lines 159-162 in source/connection.cc. Line 181 in include/restclient-cpp/connection.h.

void
RestClient::Connection::SetUserAgent(const std::string& userAgent) {
  this->customUserAgent = userAgent;
}





Add Discussion as Guest

Log in