C++ Client-Side SDK
LaunchDarkly SDK
|
#include <http_properties_builder.hpp>
Public Member Functions | |
HttpPropertiesBuilder () | |
HttpPropertiesBuilder (built::HttpProperties const &properties) | |
HttpPropertiesBuilder & | ConnectTimeout (std::chrono::milliseconds connect_timeout) |
HttpPropertiesBuilder & | ReadTimeout (std::chrono::milliseconds read_timeout) |
HttpPropertiesBuilder & | WriteTimeout (std::chrono::milliseconds write_timeout) |
HttpPropertiesBuilder & | ResponseTimeout (std::chrono::milliseconds response_timeout) |
HttpPropertiesBuilder & | WrapperName (std::string wrapper_name) |
HttpPropertiesBuilder & | WrapperVersion (std::string wrapper_version) |
HttpPropertiesBuilder & | Headers (std::map< std::string, std::string > base_headers) |
HttpPropertiesBuilder & | Header (std::string key, std::optional< std::string > value) |
HttpPropertiesBuilder & | Tls (TlsBuilder< SDK > builder) |
built::HttpProperties | Build () const |
Class used for building a set of HttpProperties.
SDK | The SDK type to build properties for. This affects the default values of the built properties. |
launchdarkly::config::shared::builders::HttpPropertiesBuilder< SDK >::HttpPropertiesBuilder |
Construct a new HttpPropertiesBuilder. The builder will use the default properties based on the SDK type. Setting a property will override the default value.
launchdarkly::config::shared::builders::HttpPropertiesBuilder< SDK >::HttpPropertiesBuilder | ( | built::HttpProperties const & | properties | ) |
Create a properties builder from an initial set of properties. This can be useful when extending a set of properties for a request. For instance to add extra headers.
properties | The properties to start with. |
built::HttpProperties launchdarkly::config::shared::builders::HttpPropertiesBuilder< SDK >::Build |
Build a set of HttpProperties.
HttpPropertiesBuilder< SDK > & launchdarkly::config::shared::builders::HttpPropertiesBuilder< SDK >::ConnectTimeout | ( | std::chrono::milliseconds | connect_timeout | ) |
The network connection timeout.
connect_timeout | The connect timeout. |
HttpPropertiesBuilder< SDK > & launchdarkly::config::shared::builders::HttpPropertiesBuilder< SDK >::Header | ( | std::string | key, |
std::optional< std::string > | value | ||
) |
Set an optional header value. If the value is std::nullopt, any existing header by that name is removed.
name | The name of the header. |
value | The optional header value. |
HttpPropertiesBuilder< SDK > & launchdarkly::config::shared::builders::HttpPropertiesBuilder< SDK >::Headers | ( | std::map< std::string, std::string > | base_headers | ) |
Set all custom headers. This will replace any other customer headers that were set with the Header method, or any previously set headers using the Headers method.
base_headers | The custom headers. |
HttpPropertiesBuilder< SDK > & launchdarkly::config::shared::builders::HttpPropertiesBuilder< SDK >::ReadTimeout | ( | std::chrono::milliseconds | read_timeout | ) |
Set a read timeout. This is the time after the first byte has been received that a read has to complete.
read_timeout | The read timeout. |
HttpPropertiesBuilder< SDK > & launchdarkly::config::shared::builders::HttpPropertiesBuilder< SDK >::ResponseTimeout | ( | std::chrono::milliseconds | response_timeout | ) |
The time for the first byte to be received during a read. If a byte is not received within this time, then the request will be cancelled.
response_timeout | The response timeout. |
HttpPropertiesBuilder< SDK > & launchdarkly::config::shared::builders::HttpPropertiesBuilder< SDK >::Tls | ( | TlsBuilder< SDK > | builder | ) |
Sets the builder for TLS properties.
builder | The TLS property builder. |
HttpPropertiesBuilder< SDK > & launchdarkly::config::shared::builders::HttpPropertiesBuilder< SDK >::WrapperName | ( | std::string | wrapper_name | ) |
This should be used for wrapper SDKs to set the wrapper name.
Wrapper information will be included in request headers.
wrapper_name | The name of the wrapper. |
HttpPropertiesBuilder< SDK > & launchdarkly::config::shared::builders::HttpPropertiesBuilder< SDK >::WrapperVersion | ( | std::string | wrapper_version | ) |
This should be used for wrapper SDKs to set the wrapper version.
Wrapper information will be included in request headers.
wrapper_version | The version of the wrapper. |
HttpPropertiesBuilder< SDK > & launchdarkly::config::shared::builders::HttpPropertiesBuilder< SDK >::WriteTimeout | ( | std::chrono::milliseconds | write_timeout | ) |
Set a write timeout. This is how long it takes to perform a Write operation.
write_timeout | The write timeout. |