aboutsummaryrefslogtreecommitdiffstats
path: root/yt/cpp/mapreduce/http/http_client.cpp
diff options
context:
space:
mode:
authorermolovd <ermolovd@yandex-team.com>2024-11-18 18:37:13 +0300
committerermolovd <ermolovd@yandex-team.com>2024-11-18 19:07:19 +0300
commiteb9ebcd66823f2331380c62c209c41382fcdabdb (patch)
treecbb1bf8cac576fa446fd44f96086f1fbf8e1a609 /yt/cpp/mapreduce/http/http_client.cpp
parent2af8e95bd4d3f701a8dd6d255b1af4ef4a205cf4 (diff)
downloadydb-eb9ebcd66823f2331380c62c209c41382fcdabdb.tar.gz
cpp/mapreduce: fix style
commit_hash:4b9b636737f162b91295356e0ac17f0ea2beab20
Diffstat (limited to 'yt/cpp/mapreduce/http/http_client.cpp')
-rw-r--r--yt/cpp/mapreduce/http/http_client.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/yt/cpp/mapreduce/http/http_client.cpp b/yt/cpp/mapreduce/http/http_client.cpp
index 305d95b06c..97bf4a7703 100644
--- a/yt/cpp/mapreduce/http/http_client.cpp
+++ b/yt/cpp/mapreduce/http/http_client.cpp
@@ -170,19 +170,21 @@ public:
auto request = std::make_unique<THttpRequest>(requestId);
auto urlRef = NHttp::ParseUrl(url);
+ auto host = CreateHost(urlRef.Host, urlRef.PortStr);
- request->Connect(CreateHost(urlRef.Host, urlRef.PortStr), config.SocketTimeout);
+ request->Connect(host, config.SocketTimeout);
request->SmallRequest(header, body);
return std::make_unique<TDefaultHttpResponse>(std::move(request));
}
IHttpRequestPtr StartRequest(const TString& url, const TString& requestId, const THttpConfig& config, const THttpHeader& header) override
{
- auto request = std::make_unique<THttpRequest>(requestId);
-
auto urlRef = NHttp::ParseUrl(url);
+ auto host = CreateHost(urlRef.Host, urlRef.PortStr);
+
+ auto request = std::make_unique<THttpRequest>(requestId);
- request->Connect(CreateHost(urlRef.Host, urlRef.PortStr), config.SocketTimeout);
+ request->Connect(host, config.SocketTimeout);
auto stream = request->StartRequest(header);
return std::make_unique<TDefaultHttpRequest>(std::move(request), stream);
}