diff --git a/sdk/core/azure-core/src/http/http.cpp b/sdk/core/azure-core/src/http/http.cpp index 4d05ece7f..c76691b04 100644 --- a/sdk/core/azure-core/src/http/http.cpp +++ b/sdk/core/azure-core/src/http/http.cpp @@ -3,7 +3,6 @@ #include "azure/core/http/http.hpp" #include "azure/core/http/policies/policy.hpp" -#include "azure/core/internal/io/null_body_stream.hpp" #include "azure/core/url.hpp" #include @@ -13,7 +12,6 @@ using namespace Azure::Core; using namespace Azure::Core::Http; -using namespace Azure::Core::IO::_internal; char const Azure::Core::Http::_internal::HttpShared::ContentType[] = "content-type"; char const Azure::Core::Http::_internal::HttpShared::ApplicationJson[] = "application/json"; @@ -55,13 +53,3 @@ void Azure::Core::Http::_detail::RawResponseHelpers::InsertHeaderWithValidation( // insert (override if duplicated) headers[headerName] = headerValue; } - -Request::Request(HttpMethod httpMethod, Url url, bool shouldBufferResponse) - : Request(httpMethod, std::move(url), NullBodyStream::GetNullBodyStream(), shouldBufferResponse) -{ -} - -Request::Request(HttpMethod httpMethod, Url url) - : Request(httpMethod, std::move(url), NullBodyStream::GetNullBodyStream(), true) -{ -} diff --git a/sdk/core/azure-core/src/http/request.cpp b/sdk/core/azure-core/src/http/request.cpp index be4b2a83f..44f1a3db6 100644 --- a/sdk/core/azure-core/src/http/request.cpp +++ b/sdk/core/azure-core/src/http/request.cpp @@ -2,6 +2,7 @@ // SPDX-License-Identifier: MIT #include "azure/core/http/http.hpp" +#include "azure/core/internal/io/null_body_stream.hpp" #include "azure/core/internal/strings.hpp" #include @@ -9,6 +10,7 @@ #include using namespace Azure::Core::Http; +using namespace Azure::Core::IO::_internal; namespace { // returns left map plus all items in right @@ -22,6 +24,16 @@ static Azure::Core::CaseInsensitiveMap MergeMaps( } } // namespace +Request::Request(HttpMethod httpMethod, Url url, bool shouldBufferResponse) + : Request(httpMethod, std::move(url), NullBodyStream::GetNullBodyStream(), shouldBufferResponse) +{ +} + +Request::Request(HttpMethod httpMethod, Url url) + : Request(httpMethod, std::move(url), NullBodyStream::GetNullBodyStream(), true) +{ +} + Azure::Nullable Request::GetHeader(std::string const& name) { for (auto const& hdrs : {m_retryHeaders, m_headers})