[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/gmos/esp32_https_server/master/https/ResourceParameters.hpp [Back]  [Original]

/*
 * ResourceParameters.hpp
 *
 *  Created on: Dec 18, 2017
 *      Author: frank
 */

#ifndef HTTPS_RESOURCEPARAMETERS_HPP_
#define HTTPS_RESOURCEPARAMETERS_HPP_

#include 

#include 
// Arduino declares it's own min max, incompatible with the stl...
#undef min
#undef max
#include 
#include 

#include "util.hpp"

namespace httpsserver {

struct requestparam_t {std::string name; std::string value;};

class ResourceParameters {
public:
	ResourceParameters();
	virtual ~ResourceParameters();

	bool isRequestParameterSet(std::string &name);
	std::string getRequestParameter(std::string &name);
	uint16_t getRequestParameterInt(std::string &name);
	void setRequestParameter(std::string name, std::string 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 val);

private:
	std::vector _urlParams;
	std::vector _reqParams;
};

} /* namespace httpsserver */

#endif /* HTTPS_RESOURCEPARAMETERS_HPP_ */

Web Proxy Viewer  |  New URL  |  Original Page