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

#include <yt/yt/core/http/public.h>

#include <memory>

namespace NYT::NHttp {

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

/// @brief Wrapper for THeaderPtr which allows to hide NYT::IntrusivePtr from interfaces.
struct THeadersPtrWrapper
{
    THeadersPtrWrapper(THeadersPtr ptr)
        : Ptr(std::make_shared<THeadersPtr>(std::move(ptr)))
    { }

    THeadersPtr Get() {
        return *Ptr;
    }

    std::shared_ptr<THeadersPtr> Ptr;
};

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

} // namespace NYT::NHttp