diff options
author | trofimenkov <trofimenkov@yandex-team.com> | 2024-05-29 11:24:03 +0300 |
---|---|---|
committer | trofimenkov <trofimenkov@yandex-team.com> | 2024-05-29 11:41:02 +0300 |
commit | 9314042511cd9d2598ed16eb0a19c84909895938 (patch) | |
tree | 29a96bee879eef2cff2bb1fbf98f50e080f0622c /library/cpp/http/simple/http_client_options.h | |
parent | 8788a47c2b48e19d7246346fae2ae5e446575a7a (diff) | |
download | ydb-9314042511cd9d2598ed16eb0a19c84909895938.tar.gz |
MaxRedirectCount param for http/simple
1b80d64b6a03772edc52f2331a860ff0b5621898
Diffstat (limited to 'library/cpp/http/simple/http_client_options.h')
-rw-r--r-- | library/cpp/http/simple/http_client_options.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/library/cpp/http/simple/http_client_options.h b/library/cpp/http/simple/http_client_options.h index f2e964a462..603ca5103a 100644 --- a/library/cpp/http/simple/http_client_options.h +++ b/library/cpp/http/simple/http_client_options.h @@ -51,9 +51,19 @@ public: return ConnectTimeout_; } + TSelf& MaxRedirectCount(int count) { + MaxRedirectCount_ = count; + return *this; + } + + ui16 MaxRedirectCount() const noexcept { + return MaxRedirectCount_; + } + private: TString Host_; ui16 Port_; TDuration SocketTimeout_ = TDuration::Seconds(5); TDuration ConnectTimeout_ = TDuration::Seconds(30); + int MaxRedirectCount_ = INT_MAX; }; |