import rest client
This commit is contained in:
49
src/plugins/uhttpd/uhttpd-rest-api/core/http-parameter.h
Normal file
49
src/plugins/uhttpd/uhttpd-rest-api/core/http-parameter.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/*!
|
||||
* (C) Copyright 2003-2017 Awox SA. All rights reserved.
|
||||
* This work contains confidential trade secrets of Awox.
|
||||
* Use, examination, copying, transfer and disclosure to others
|
||||
* are prohibited, except with the express written agreement of Awox.
|
||||
*
|
||||
* @Author: Awox
|
||||
* @Date: 30/06/2017
|
||||
*/
|
||||
|
||||
#ifndef _HTTP_PARAMETERS_H
|
||||
#define _HTTP_PARAMETERS_H
|
||||
|
||||
/*------------------------------- INCLUDES ----------------------------------*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
/*----------------------------- Dependencies --------------------------------*/
|
||||
|
||||
struct client;
|
||||
|
||||
/*--------------------------------- CLASS ----------------------------------*/
|
||||
|
||||
class HttpParameter {
|
||||
|
||||
public:
|
||||
HttpParameter (void);
|
||||
|
||||
std::string parse_from_uri (const std::string &a_parameters);
|
||||
|
||||
bool parse (client *a_client);
|
||||
|
||||
std::string get_origin (void);
|
||||
std::string get_etag (void);
|
||||
int16_t get_request_timeout (void);
|
||||
|
||||
private:
|
||||
std::vector<std::string> split_params (const std::string &a_string, char a_seperator);
|
||||
bool is_number (const std::string & a_string);
|
||||
|
||||
std::string m_origin;
|
||||
std::string m_etag;
|
||||
int16_t m_request_timeout;
|
||||
};
|
||||
|
||||
#endif /* _HTTP_PARAMETERS_H */
|
||||
Reference in New Issue
Block a user