|
A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
|
An HTTP/2 client connection, reusable across many streams. More...
#include <cpp/a11/net/http2.h>
Classes | |
| struct | Impl |
Public Member Functions | |
| ~Http2Client () | |
| absl::StatusOr< std::shared_ptr< Http2ResponseStream > > | RequestStream (std::string method, std::string path, HttpHeaders headers={}, std::string body={}, std::string scheme={}) |
| Opens a request and returns a pull-oriented response body stream. | |
| absl::StatusOr< std::shared_ptr< Http2DuplexStream > > | ExtendedConnect (std::string protocol, std::string path, HttpHeaders headers={}, std::string scheme={}) |
| Opens an extended CONNECT duplex stream for bidirectional data. | |
| a11::Future< HttpResponse > | Request (std::string method, std::string path, HttpHeaders headers={}, std::string body={}, std::string scheme={}) |
| absl::Status | Close () |
| Closes the client connection. | |
| std::string | host () const |
| std::uint16_t | port () const |
| bool | connected () const |
| bool | secure () const |
| void *absl_nullable | GetImpl () const |
Static Public Member Functions | |
| static a11::Future< std::shared_ptr< Http2Client > > | Connect (std::string host, std::uint16_t port, Http2Options options={}) |
| Asynchronously connects to an HTTP/2 server. | |
An HTTP/2 client connection, reusable across many streams.
Issues buffered requests, incremental response streams, or extended CONNECT duplex streams over a single connection. Shared as the transport backing HTTP SSE and WebSocket client wire streams.
| a11::net::Http2Client::~Http2Client | ( | ) |
| absl::Status a11::net::Http2Client::Close | ( | ) |
Closes the client connection.
|
static |
Asynchronously connects to an HTTP/2 server.
| host | Server hostname. |
| port | Server port. |
| options | Body limits, buffering, deadline, and TLS settings. |
| bool a11::net::Http2Client::connected | ( | ) | const |
| absl::StatusOr< std::shared_ptr< Http2DuplexStream > > a11::net::Http2Client::ExtendedConnect | ( | std::string | protocol, |
| std::string | path, | ||
| HttpHeaders | headers = {}, |
||
| std::string | scheme = {} |
||
| ) |
Opens an extended CONNECT duplex stream for bidirectional data.
| void *absl_nullable a11::net::Http2Client::GetImpl | ( | ) | const |
| std::string a11::net::Http2Client::host | ( | ) | const |
| std::uint16_t a11::net::Http2Client::port | ( | ) | const |
| a11::Future< HttpResponse > a11::net::Http2Client::Request | ( | std::string | method, |
| std::string | path, | ||
| HttpHeaders | headers = {}, |
||
| std::string | body = {}, |
||
| std::string | scheme = {} |
||
| ) |
| absl::StatusOr< std::shared_ptr< Http2ResponseStream > > a11::net::Http2Client::RequestStream | ( | std::string | method, |
| std::string | path, | ||
| HttpHeaders | headers = {}, |
||
| std::string | body = {}, |
||
| std::string | scheme = {} |
||
| ) |
Opens a request and returns a pull-oriented response body stream.
| bool a11::net::Http2Client::secure | ( | ) | const |