diff options
author | komels <komels@yandex-team.ru> | 2022-04-15 16:53:39 +0300 |
---|---|---|
committer | komels <komels@yandex-team.ru> | 2022-04-15 16:53:39 +0300 |
commit | 703a2fb6e100d202d1c7fcd052d73bd5affef408 (patch) | |
tree | 22b7320c06bb04d86dbf7b9af9ae44281331cd15 /library/cpp/http/simple/http_client_options.h | |
parent | 3375bbfda1e2afb03aa2072bf5f2f2c3a26026e8 (diff) | |
download | ydb-703a2fb6e100d202d1c7fcd052d73bd5affef408.tar.gz |
Move 'kikimr/yndx'-depending tests out of ydb/core
ref:0a380e13308d579e0545a76924330d1ca5129c43
Diffstat (limited to 'library/cpp/http/simple/http_client_options.h')
-rw-r--r-- | library/cpp/http/simple/http_client_options.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/library/cpp/http/simple/http_client_options.h b/library/cpp/http/simple/http_client_options.h deleted file mode 100644 index f2e964a462a..00000000000 --- a/library/cpp/http/simple/http_client_options.h +++ /dev/null @@ -1,59 +0,0 @@ -#pragma once - -#include <util/datetime/base.h> -#include <library/cpp/string_utils/url/url.h> - -class TSimpleHttpClientOptions { - using TSelf = TSimpleHttpClientOptions; - -public: - TSimpleHttpClientOptions() = default; - - explicit TSimpleHttpClientOptions(TStringBuf url) { - TStringBuf scheme, host; - GetSchemeHostAndPort(url, scheme, host, Port_); - Host_ = url.Head(scheme.size() + host.size()); - } - - TSelf& Host(TStringBuf host) { - Host_ = host; - return *this; - } - - const TString& Host() const noexcept { - return Host_; - } - - TSelf& Port(ui16 port) { - Port_ = port; - return *this; - } - - ui16 Port() const noexcept { - return Port_; - } - - TSelf& SocketTimeout(TDuration timeout) { - SocketTimeout_ = timeout; - return *this; - } - - TDuration SocketTimeout() const noexcept { - return SocketTimeout_; - } - - TSelf& ConnectTimeout(TDuration timeout) { - ConnectTimeout_ = timeout; - return *this; - } - - TDuration ConnectTimeout() const noexcept { - return ConnectTimeout_; - } - -private: - TString Host_; - ui16 Port_; - TDuration SocketTimeout_ = TDuration::Seconds(5); - TDuration ConnectTimeout_ = TDuration::Seconds(30); -}; |