Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
42 lines (31 loc) · 1.08 KB

File metadata and controls

42 lines (31 loc) · 1.08 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef SRC_RESOURCEPARAMETERS_HPP_
#define SRC_RESOURCEPARAMETERS_HPP_
#include <Arduino.h>
#include <string>
// Arduino declares it's own min max, incompatible with the stl...
#undef min
#undef max
#include <vector>
#include <utility>
#include "util.hpp"
namespace httpsserver {
struct requestparam_t {std::string name; std::string value;};
class ResourceParameters {
public:
ResourceParameters();
virtual ~ResourceParameters();
bool isRequestParameterSet(std::string const &name);
std::string getRequestParameter(std::string const &name);
uint16_t getRequestParameterInt(std::string const &name);
void setRequestParameter(std::string const &name, std::string const &value);
std::string getUrlParameter(uint8_t idx);
uint16_t getUrlParameterInt(uint8_t idx);
void resetUrlParameters();
void setUrlParameterCount(uint8_t idx);
void setUrlParameter(uint8_t idx, std::string const &val);
private:
std::vector<std::string> _urlParams;
std::vector<std::pair<std::string, std::string>> _reqParams;
};
} /* namespace httpsserver */
#endif /* SRC_RESOURCEPARAMETERS_HPP_ */
Morty Proxy This is a proxified and sanitized view of the page, visit original site.