Ada 3.4.0
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
scheme.h File Reference

URL scheme type definitions and utilities. More...

#include "ada/common_defs.h"
#include <string>

Go to the source code of this file.

Namespaces

namespace  ada::scheme
 URL scheme utilities and constants.
 
namespace  ada
 

Enumerations

enum  ada::scheme::type : uint8_t {
  ada::scheme::HTTP = 0 , ada::scheme::NOT_SPECIAL = 1 , ada::scheme::HTTPS = 2 , ada::scheme::WS = 3 ,
  ada::scheme::FTP = 4 , ada::scheme::WSS = 5 , ada::scheme::FILE = 6
}
 Enumeration of URL scheme types. More...
 

Functions

constexpr uint16_t ada::scheme::get_special_port (std::string_view scheme) noexcept
 
constexpr uint16_t ada::scheme::get_special_port (ada::scheme::type type) noexcept
 
constexpr ada::scheme::type ada::scheme::get_scheme_type (std::string_view scheme) noexcept
 

Detailed Description

URL scheme type definitions and utilities.

This header defines the URL scheme types (http, https, etc.) and provides functions to identify special schemes and their default ports according to the WHATWG URL Standard.

See also
https://url.spec.whatwg.org/#special-scheme

Definition in file scheme.h.