tinyhttp
All Classes Files Functions Pages
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tinyhttp::HttpParameters Class Reference

API for http parameters: key=value&key1=value1. More...

#include <HttpParameters.h>

Public Member Functions

 HttpParameters (const int maxLen=256)
 Default Constructor.
 
 ~HttpParameters ()
 Destructor.
 
void clear ()
 Clears all values.
 
float getFloat (const char *key)
 Returns the value for a parameter id as float.
 
int getInt (const char *key)
 Returns the value for a parameter id as int.
 
HttpParameterEntry * getParameter (const char *key)
 Returns a HttpParameterEntry for a parameter id.
 
const char * getValue (const char *key)
 Returns the value for a parameter id as string.
 
bool hasKey (const char *key)
 Checks if the parameter exists.
 
void parse (Stream &in)
 Parses the parameters in the client stream.
 
void parse (Stream &in, void(*callback)(const char *key, const char *value))
 

Protected Member Functions

void urldecode2 (char *dst, const char *src)
 

Protected Attributes

int max_len
 
Vector< HttpParameterEntry * > parameters
 

Detailed Description

API for http parameters: key=value&key1=value1.

Member Function Documentation

◆ parse()

void tinyhttp::HttpParameters::parse ( Stream in,
void(*)(const char *key, const char *value)  callback 
)
inline

Parses the parameters in the client stream and provides the result via a callback method


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