An absolute URL split into the parts a connection needs.
More...
#include <cpp/a11/net/http/url.h>
|
| 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.
|
| |
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.
◆ 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 |
◆ 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: