azure-data-tables
Loading...
Searching...
No Matches
timeout_policy.hpp
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4#pragma once
5
6#include <azure/core/http/policies/policy.hpp>
7
8#include <memory>
9
10namespace Azure { namespace Data { namespace Tables { namespace _detail { namespace Policies {
11
12 class TimeoutPolicy final : public Core::Http::Policies::HttpPolicy {
13 constexpr static const char* HttpHeaderDate = "date";
14 constexpr static const char* HttpHeaderXMsDate = "x-ms-date";
15 constexpr static const char* HttpQueryTimeout = "timeout";
16 constexpr static const char* HttpHeaderClientRequestId = "x-ms-client-request-id";
17
18 public:
19 ~TimeoutPolicy() override {}
20
21 std::unique_ptr<HttpPolicy> Clone() const override
22 {
23 return std::make_unique<TimeoutPolicy>(*this);
24 }
25
26 std::unique_ptr<Core::Http::RawResponse> Send(
27 Core::Http::Request& request,
28 Core::Http::Policies::NextHttpPolicy nextPolicy,
29 Core::Context const& context) const override;
30 };
31
32}}}}} // namespace Azure::Data::Tables::_detail::Policies