diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/messagebus/rain_check/http/client.h | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 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 d4199c4c98..b7f822ae10 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; + }; -} +} |