HttpParams Class Reference

Handles the query portion of a URI. More...

#include <HttpParams.h>

Inheritance diagram for HttpParams:
Collaboration diagram for HttpParams:

Public Member Functions

 HttpParams ()=default
 
 HttpParams (const HttpParams &params)
 
 HttpParams (String query)
 
void parseQuery (char *query)
 Called from URL class to process query section of a URI. More...
 
String toString () const
 Return full escaped content for incorporation into a URI. More...
 
 operator String () const
 
HttpParamsoperator= (const HttpParams &params)
 
size_t printTo (Print &p) const
 
void debugPrintTo (Print &p) const
 Printable output for debugging. More...
 
- Public Member Functions inherited from HashMap< String, String >
 HashMap ()
 
 HashMap (Comparator compare)
 
unsigned int count () const
 
const StringkeyAt (unsigned int idx) const
 
StringkeyAt (unsigned int idx)
 
const StringvalueAt (unsigned int idx) const
 
StringvalueAt (unsigned int idx)
 
const Stringoperator[] (const String &key) const
 
Stringoperator[] (const String &key)
 
bool allocate (unsigned int newSize)
 
void sort (SortCompare compare)
 Sort map entries. More...
 
int indexOf (const String &key) const
 
bool contains (const String &key) const
 
void removeAt (unsigned index)
 
void remove (const String &key)
 
void clear ()
 
void setMultiple (const HashMap< String, String > &map)
 
void setNullValue (const String &nullv)
 
Iterator< false > begin ()
 
Iterator< true > begin () const
 
Iterator< false > end ()
 
Iterator< true > end () const
 

Additional Inherited Members

- Public Types inherited from HashMap< String, String >
using Element = BaseElement< false >
 
using ElementConst = BaseElement< true >
 
using Comparator = bool(*)(const String &, const String &)
 Compare two keys for equality. More...
 
using SortCompare = bool(*)(const ElementConst &e1, const ElementConst &e2)
 Return true if key1 < key2. More...
 
- Protected Types inherited from HashMap< String, String >
using KeyList = wiring_private::List< String >
 
using ValueList = wiring_private::List< String >
 
- Protected Attributes inherited from HashMap< String, String >
KeyList keys
 
ValueList values
 
Comparator cb_comparator
 
unsigned currentIndex
 
String nil
 

Detailed Description

Handles the query portion of a URI.

Todo:
values stored in escaped form, unescape return value and escape provided values. Revise HttpBodyParser.cpp as it will no longer do this job.

Constructor & Destructor Documentation

◆ HttpParams() [1/3]

HttpParams::HttpParams ( )
default

◆ HttpParams() [2/3]

HttpParams::HttpParams ( const HttpParams params)
inline

◆ HttpParams() [3/3]

HttpParams::HttpParams ( String  query)
inline

Member Function Documentation

◆ debugPrintTo()

void HttpParams::debugPrintTo ( Print p) const

Printable output for debugging.

Parameters
p

◆ operator String()

HttpParams::operator String ( ) const
inline

◆ operator=()

HttpParams& HttpParams::operator= ( const HttpParams params)
inline

◆ parseQuery()

void HttpParams::parseQuery ( char *  query)

Called from URL class to process query section of a URI.

Parameters
queryextracted from URI, with or without '?' prefix
Return values
booltrue on success, false if parsing failed
Note
query string is modified by this call

◆ printTo()

size_t HttpParams::printTo ( Print p) const

◆ toString()

String HttpParams::toString ( ) const

Return full escaped content for incorporation into a URI.


The documentation for this class was generated from the following file: