aboutsummaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/http/helpers.h
blob: 474813674ef656c54dc35b6ce478137b52ca94a0 (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
#pragma once

#include "fwd.h"

#include "http.h"

#include <util/generic/fwd.h>

namespace NYT {

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

TString CreateHostNameWithPort(const TString& name, const TClientContext& context);

TString GetFullUrl(const TString& hostName, const TClientContext& context, THttpHeader& header);

void UpdateHeaderForProxyIfNeed(const TString& hostName, const TClientContext& context, THttpHeader& header);

TString GetFullUrlForProxy(const TString& hostName, const TClientContext& context, THttpHeader& header);

TString TruncateForLogs(const TString& text, size_t maxSize);

TString GetLoggedAttributes(const THttpHeader& header, const TString& url, bool includeParameters, size_t sizeLimit);

void LogRequest(const THttpHeader& header, const TString& url, bool includeParameters, const TString& requestId, const TString& hostName);

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

} // namespace NYT