retry_request.h 944 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include "fwd.h"
  3. #include <yt/cpp/mapreduce/http/http_client.h>
  4. #include <yt/cpp/mapreduce/interface/fwd.h>
  5. #include <util/generic/maybe.h>
  6. namespace NYT::NDetail {
  7. ////////////////////////////////////////////////////////////////////////////////
  8. struct TResponseInfo
  9. {
  10. TString RequestId;
  11. TString Response;
  12. int HttpCode = 0;
  13. };
  14. ////////////////////////////////////////////////////////////////////////////////
  15. struct TRequestConfig
  16. {
  17. NHttpClient::THttpConfig HttpConfig;
  18. bool IsHeavy = false;
  19. };
  20. ////////////////////////////////////////////////////////////////////////////////
  21. NHttpClient::IHttpResponsePtr RequestWithoutRetry(
  22. const TClientContext& context,
  23. TMutationId& mutationId,
  24. THttpHeader& header,
  25. TMaybe<TStringBuf> body = {},
  26. const TRequestConfig& config = {});
  27. ////////////////////////////////////////////////////////////////////////////////
  28. } // namespace NYT::NDetail