WPILibC++ 2024.3.2
|
Map for looking up elements of the query portion of a URI. More...
#include <wpinet/HttpUtil.h>
Public Member Functions | |
HttpQueryMap ()=default | |
Constructs an empty map (with no entries). More... | |
HttpQueryMap (std::string_view query) | |
Constructs from an escaped query string. More... | |
std::optional< std::string_view > | Get (std::string_view name, SmallVectorImpl< char > &buf) const |
Gets an element of the query string. More... | |
Map for looking up elements of the query portion of a URI.
Does not handle multiple elements with the same name. This is a reference type; it does not make a copy of the query string, so it is important that the query string has a lifetime at least as long as this object.
|
default |
Constructs an empty map (with no entries).
|
explicit |
Constructs from an escaped query string.
Note: does not make a copy of the query string, so it must not be a temporary.
query | query string |
std::optional< std::string_view > wpi::HttpQueryMap::Get | ( | std::string_view | name, |
SmallVectorImpl< char > & | buf | ||
) | const |
Gets an element of the query string.
Both the name and the returned value are unescaped strings.
name | name (unescaped) |
buf | result buffer for value |