diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /library/cpp/messagebus/rain_check/http/client.h | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) | |
download | ydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/messagebus/rain_check/http/client.h')
-rw-r--r-- | library/cpp/messagebus/rain_check/http/client.h | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/library/cpp/messagebus/rain_check/http/client.h b/library/cpp/messagebus/rain_check/http/client.h index b7f822ae10..d4199c4c98 100644 --- a/library/cpp/messagebus/rain_check/http/client.h +++ b/library/cpp/messagebus/rain_check/http/client.h @@ -13,66 +13,66 @@ class THttpHeaders; namespace NNeh { - class IProtocol; - struct TResponse; -} + class IProtocol; + struct TResponse; +} namespace NRainCheck { - class THttpCallback; - class THttpClientService; + class THttpCallback; + class THttpClientService; - class THttpFuture: public TSubtaskCompletion { - public: - enum EError { - NoError = 0, + class THttpFuture: public TSubtaskCompletion { + public: + enum EError { + NoError = 0, - CantResolveNameError = 1, - BadHttpCodeError = 2, + CantResolveNameError = 1, + BadHttpCodeError = 2, - OtherError = 100 - }; + OtherError = 100 + }; - private: - friend class THttpCallback; - friend class THttpClientService; + private: + friend class THttpCallback; + friend class THttpClientService; - public: - THttpFuture(); - ~THttpFuture() override; + public: + THttpFuture(); + ~THttpFuture() override; - bool HasHttpCode() const; - bool HasResponseBody() const; + bool HasHttpCode() const; + bool HasResponseBody() const; - ui32 GetHttpCode() const; - TString GetResponseBody() const; + ui32 GetHttpCode() const; + TString GetResponseBody() const; - bool HasError() const; - EError GetErrorCode() const; - TString GetErrorDescription() const; + bool HasError() const; + EError GetErrorCode() const; + TString GetErrorDescription() const; - private: - void SetDoneAndSchedule(TAutoPtr<NNeh::TResponse> response); - void SetFail(EError errorCode, const TStringBuf& errorDescription); + private: + void SetDoneAndSchedule(TAutoPtr<NNeh::TResponse> response); + void SetFail(EError errorCode, const TStringBuf& errorDescription); - private: - TTaskRunnerBase* Task; - TMaybe<HttpCodes> HttpCode; - THolder<NNeh::TResponse> Response; - EError ErrorCode; - TString ErrorDescription; - }; + private: + TTaskRunnerBase* Task; + TMaybe<HttpCodes> HttpCode; + THolder<NNeh::TResponse> Response; + EError ErrorCode; + TString ErrorDescription; + }; - class THttpClientService { - public: - THttpClientService(); - virtual ~THttpClientService(); + class THttpClientService { + public: + THttpClientService(); + virtual ~THttpClientService(); - void Send(const TString& request, THttpFuture* future); - void SendPost(TString addr, const TString& data, const THttpHeaders& headers, THttpFuture* future); + void Send(const TString& request, THttpFuture* future); + void SendPost(TString addr, const TString& data, const THttpHeaders& headers, THttpFuture* future); - private: - NNeh::IProtocol* const GetProtocol; - NNeh::IProtocol* const FullProtocol; - }; + private: + NNeh::IProtocol* const GetProtocol; + NNeh::IProtocol* const FullProtocol; + }; -} +} |