25#ifndef ROUTER_SRC_HTTP_INCLUDE_HTTP_CLIENT_REQUEST_H_
26#define ROUTER_SRC_HTTP_INCLUDE_HTTP_CLIENT_REQUEST_H_
60 const Headers &get_input_headers()
const override;
61 IOBuffer &get_input_buffer()
const override;
62 const std::string &get_input_body()
const override;
64 Headers &get_output_headers()
override;
65 IOBuffer &get_output_buffer()
override;
68 std::string get_response_code_line()
const;
73 const Uri &get_uri()
const override;
74 void set_uri(
const Uri &uri)
override;
75 void set_uri(
Uri &&uri)
override;
79 operator bool()
const {
80 if (!holder_)
return false;
81 return (holder_->status >= 0);
87 return holder_->status_text;
Definition: connection_interface.h:41
Definition: io_buffer.h:41
http::base::method::key_type MethodType
Definition: request.h:49
http::base::status_code::key_type StatusType
Definition: request.h:50
IOBuffer buffer_output
Definition: request.h:100
Headers headers_output
Definition: request.h:98
IOBuffer buffer_input
Definition: request.h:99
std::string status_text
Definition: request.h:107
Headers headers_input
Definition: request.h:97
MethodType method
Definition: request.h:102
Uri uri
Definition: request.h:101
Holder(const Uri &u, MethodType m)
Definition: request.h:95
std::string error_msg() const
Definition: request.h:84
std::unique_ptr< Holder > holder_
Definition: request.h:110
Request(const Uri &uri, MethodType method=http::base::method::Get)
Definition: request.h:49
Request()
Definition: request.h:52
static int get_connection(MEM_ROOT *mem_root, FEDERATED_SHARE *share)
Definition: ha_federated.cc:608
#define HTTP_CLIENT_EXPORT
Definition: http_client_export.h:15
constexpr pos_type Get
Definition: method.h:43
constexpr key_type Get
Definition: method.h:60
int key_type
Definition: method.h:38
int key_type
Definition: status_code.h:36
Request::ConnectionInterface ConnectionInterface
Definition: request.cc:38
Request::IOBuffer IOBuffer
Definition: request.cc:33
Request::Headers Headers
Definition: request.cc:35
Request::Uri Uri
Definition: request.cc:37
Definition: connection.h:56
Unique_ptr< T, std::nullptr_t > make_unique(size_t size)
In-place constructs a new unique pointer with no specific allocator and with array type T.
Definition: gcs_xcom_synode.h:64
required uint32 status
Definition: replication_asynchronous_connection_failover.proto:61
RestClient::Request Request
Definition: rest_client.cc:29