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

An absolute URL split into the parts a connection needs. More...

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

Public Member Functions

bool secure () const
 
std::string authority () const
 
std::string target () const
 
std::string origin () const
 
std::string ToString () const
 

Public Attributes

std::string scheme
 Lowercase, without "://" (e.g. "https").
 
std::string host
 Hostname or IP literal, without IPv6 brackets.
 
std::uint16_t port = 0
 Explicit port, or the scheme's default.
 
std::string path
 Begins with '/', or is empty when none was given.
 
std::string query
 Query without the leading '?'; empty when absent.
 

Detailed Description

An absolute URL split into the parts a connection needs.

The fragment is dropped during parsing: it is a client-side concern and never travels to a server.

Member Function Documentation

◆ authority()

std::string a11::net::ParsedUrl::authority ( ) const
Returns
The authority as a header value: host, host:port, or [v6host]:port. The port is omitted when it is the scheme default.

◆ origin()

std::string a11::net::ParsedUrl::origin ( ) const
Returns
scheme://authority, with no trailing slash.

◆ secure()

bool a11::net::ParsedUrl::secure ( ) const
Returns
Whether the scheme implies TLS ("https" or "wss").

◆ target()

std::string a11::net::ParsedUrl::target ( ) const
Returns
The request target: path and query, at least "/".

◆ ToString()

std::string a11::net::ParsedUrl::ToString ( ) const
Returns
The full URL, as origin() plus target().

Member Data Documentation

◆ host

std::string a11::net::ParsedUrl::host

Hostname or IP literal, without IPv6 brackets.

◆ path

std::string a11::net::ParsedUrl::path

Begins with '/', or is empty when none was given.

◆ port

std::uint16_t a11::net::ParsedUrl::port = 0

Explicit port, or the scheme's default.

◆ query

std::string a11::net::ParsedUrl::query

Query without the leading '?'; empty when absent.

◆ scheme

std::string a11::net::ParsedUrl::scheme

Lowercase, without "://" (e.g. "https").


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