algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::network::HttpRequest Struct Reference

An HTTP request for AsyncHttpClient. More...

#include <algotradelib/src/network/http_client.hpp>

Public Attributes

http::verb method_ {http::verb::get}
 The HTTP method. A GET may be sent again once after a connection failure; nothing else is.
std::string target_ {"/"}
 The request target: path and query.
std::string body_
 The request body, empty for a GET.
std::vector< std::pair< std::string, std::string > > headers_
 Additional headers, in the order they are sent.
int version_ {11}
 The HTTP version, 11 for HTTP/1.1.
RateLimitGroup group_ {RateLimitGroup::REFERENCE}
 The traffic class, for rate limiting and queue priority.

Detailed Description

An HTTP request for AsyncHttpClient.

A broker adapter builds it and sets group_, the traffic class used for rate limiting and queue priority.

Definition at line 56 of file http_client.hpp.

Member Data Documentation

◆ body_

std::string algotradelib::network::HttpRequest::body_

The request body, empty for a GET.

Definition at line 62 of file http_client.hpp.

◆ group_

RateLimitGroup algotradelib::network::HttpRequest::group_ {RateLimitGroup::REFERENCE}

The traffic class, for rate limiting and queue priority.

The default, REFERENCE, has the lowest priority, so an unlabelled request never displaces an order.

Definition at line 73 of file http_client.hpp.

◆ headers_

std::vector<std::pair<std::string, std::string> > algotradelib::network::HttpRequest::headers_

Additional headers, in the order they are sent.

Definition at line 64 of file http_client.hpp.

◆ method_

http::verb algotradelib::network::HttpRequest::method_ {http::verb::get}

The HTTP method. A GET may be sent again once after a connection failure; nothing else is.

Definition at line 58 of file http_client.hpp.

◆ target_

std::string algotradelib::network::HttpRequest::target_ {"/"}

The request target: path and query.

Definition at line 60 of file http_client.hpp.

◆ version_

int algotradelib::network::HttpRequest::version_ {11}

The HTTP version, 11 for HTTP/1.1.

Definition at line 66 of file http_client.hpp.


The documentation for this struct was generated from the following file: