azure-core
Loading...
Searching...
No Matches
transport.hpp
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
9#pragma once
10
14
15#include <memory>
16
17namespace Azure { namespace Core { namespace Http {
18
23 public:
24 // If we get a response that goes up the stack
25 // Any errors in the pipeline throws an exception
26 // At the top of the pipeline we might want to turn certain responses into exceptions
27
34 // TODO - Should this be const
35 virtual std::unique_ptr<RawResponse> Send(Request& request, Context const& context) = 0;
36
41 virtual ~HttpTransport() {}
42
43 protected:
48 HttpTransport() = default;
49
55 HttpTransport(const HttpTransport& other) = default;
56
62 HttpTransport(HttpTransport&& other) = default;
63
71 HttpTransport& operator=(const HttpTransport& other) = default;
72
77 virtual bool HasWebSocketSupport() const { return false; }
78 };
79
80}}} // namespace Azure::Core::Http
A context is a node within a unidirectional tree that represents deadlines and key/value pairs.
Definition context.hpp:72
Base class for all HTTP transport implementations.
Definition transport.hpp:22
HttpTransport(HttpTransport &&other)=default
Constructs HttpTransport by moving another instance of HttpTransport.
HttpTransport & operator=(const HttpTransport &other)=default
Assigns HttpTransport to another instance of HttpTransport.
virtual ~HttpTransport()
Destructs HttpTransport.
Definition transport.hpp:41
HttpTransport()=default
Constructs a default instance of HttpTransport.
virtual bool HasWebSocketSupport() const
Returns true if the HttpTransport supports WebSockets (the ability to communicate bidirectionally on ...
Definition transport.hpp:77
virtual std::unique_ptr< RawResponse > Send(Request &request, Context const &context)=0
Send an HTTP request over the wire.
HttpTransport(const HttpTransport &other)=default
Constructs HttpTransport by copying another instance of HttpTransport.
A request message from a client to a server.
Definition http.hpp:182
Context for canceling long running operations.
HTTP request and response functionality.
Compute the hash value for the input binary data, using SHA256, SHA384 and SHA512.
Definition azure_assert.hpp:57
Define the HTTP raw response.