import rest client

This commit is contained in:
jbnadal
2018-04-13 18:01:58 +02:00
parent 38ba93805b
commit 480c1a6002
33 changed files with 3759 additions and 0 deletions

View 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 */