aboutsummaryrefslogblamecommitdiffstats
path: root/yt/cpp/mapreduce/http/core.h
blob: 37c74d75515924e2c4292e776c95941342b6fdee (plain) (tree)

























                                                                                         
#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