10#include "wpi/util/StringExtras.hpp"
55 return wpi::util::substr(m_data, m_url.field_data[
UF_SCHEMA].off,
60 return wpi::util::substr(m_data, m_url.field_data[
UF_HOST].off,
64 unsigned int GetPort()
const {
return m_url.port; }
67 return wpi::util::substr(m_data, m_url.field_data[
UF_PATH].off,
72 return wpi::util::substr(m_data, m_url.field_data[
UF_QUERY].off,
77 return wpi::util::substr(m_data, m_url.field_data[
UF_FRAGMENT].off,
82 return wpi::util::substr(m_data, m_url.field_data[
UF_USERINFO].off,
88 std::string_view m_data;
std::string_view GetPath() const
Definition UrlParser.hpp:66
UrlParser(std::string_view in, bool isConnect)
Parse a URL.
Definition UrlParser.hpp:25
bool HasFragment() const
Definition UrlParser.hpp:46
std::string_view GetFragment() const
Definition UrlParser.hpp:76
bool HasSchema() const
Definition UrlParser.hpp:36
bool HasPath() const
Definition UrlParser.hpp:42
std::string_view GetQuery() const
Definition UrlParser.hpp:71
bool HasPort() const
Definition UrlParser.hpp:40
std::string_view GetSchema() const
Definition UrlParser.hpp:54
std::string_view GetHost() const
Definition UrlParser.hpp:59
bool IsValid() const
Determine if the URL is valid (e.g.
Definition UrlParser.hpp:34
unsigned int GetPort() const
Definition UrlParser.hpp:64
bool HasQuery() const
Definition UrlParser.hpp:44
bool HasHost() const
Definition UrlParser.hpp:38
bool HasUserInfo() const
Definition UrlParser.hpp:50
std::string_view GetUserInfo() const
Definition UrlParser.hpp:81
Definition raw_socket_ostream.hpp:9
@ UF_QUERY
Definition http_parser.hpp:332
@ UF_USERINFO
Definition http_parser.hpp:334
@ UF_SCHEMA
Definition http_parser.hpp:328
@ UF_HOST
Definition http_parser.hpp:329
@ UF_PORT
Definition http_parser.hpp:330
@ UF_FRAGMENT
Definition http_parser.hpp:333
@ UF_PATH
Definition http_parser.hpp:331
void http_parser_url_init(struct http_parser_url *u)
int http_parser_parse_url(const char *buf, size_t buflen, int is_connect, struct http_parser_url *u)
Definition http_parser.hpp:346