A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
a11::net::FetchOptions Struct Reference

What to request, and how hard to try. More...

#include <cpp/a11/net/http/fetch.h>

Public Member Functions

absl::Status Validate () const
 

Public Attributes

std::string method = "GET"
 Request method.
 
HttpHeaders headers
 Extra request headers.
 
std::string body
 Request body, for methods that take one.
 
int max_redirects = 5
 Redirects to follow before giving up.
 
absl::Duration timeout = absl::Minutes(5)
 Wall-clock bound on the whole operation, redirects included.
 
Http2Options transport
 Transport settings.
 
bool default_user_agent = true
 Send a default user-agent when headers does not carry one.
 

Detailed Description

What to request, and how hard to try.

Member Function Documentation

◆ Validate()

absl::Status a11::net::FetchOptions::Validate ( ) const
Returns
OK when the options are self-consistent.

Member Data Documentation

◆ body

std::string a11::net::FetchOptions::body

Request body, for methods that take one.

◆ default_user_agent

bool a11::net::FetchOptions::default_user_agent = true

Send a default user-agent when headers does not carry one.

◆ headers

HttpHeaders a11::net::FetchOptions::headers

Extra request headers.

◆ max_redirects

int a11::net::FetchOptions::max_redirects = 5

Redirects to follow before giving up.

Zero returns the 3xx response as-is rather than treating it as an error, which is what a caller inspecting Location itself wants.

◆ method

std::string a11::net::FetchOptions::method = "GET"

Request method.

◆ timeout

absl::Duration a11::net::FetchOptions::timeout = absl::Minutes(5)

Wall-clock bound on the whole operation, redirects included.

◆ transport

Http2Options a11::net::FetchOptions::transport

Transport settings.

tls.enabled is set from the URL scheme, so leave it alone and use the other TLS fields for certificates and trust roots. max_response_body_size bounds Fetch(); FetchToSink() streams and so is bounded only by what the sink accepts.


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