summaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/http/retry_request.h
blob: 01897122260e29f12885584a0b1e07f3b272a1ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#pragma once

#include "fwd.h"

#include <yt/cpp/mapreduce/http/http_client.h>

#include <yt/cpp/mapreduce/interface/fwd.h>

#include <util/generic/maybe.h>

namespace NYT::NDetail {

////////////////////////////////////////////////////////////////////////////////

struct TResponseInfo
{
    TString RequestId;
    TString Response;
    int HttpCode = 0;
};

////////////////////////////////////////////////////////////////////////////////

struct TRequestConfig
{
    NHttpClient::THttpConfig HttpConfig;
    bool IsHeavy = false;
};

////////////////////////////////////////////////////////////////////////////////

NHttpClient::IHttpResponsePtr RequestWithoutRetry(
    const TClientContext& context,
    TMutationId& mutationId,
    THttpHeader& header,
    TMaybe<TStringBuf> body = {},
    const TRequestConfig& config = {});

NHttpClient::IHttpRequestPtr StartRequestWithoutRetry(
    const TClientContext& context,
    THttpHeader& header,
    const TRequestConfig& config = {});

////////////////////////////////////////////////////////////////////////////////

} // namespace NYT::NDetail