src/HTTPServer.h
branchv_0
changeset 8 90990c8b6aef
parent 4 37a86904145c
equal deleted inserted replaced
7:315d985f8424 8:90990c8b6aef
    35 	}
    35 	}
    36 
    36 
    37 
    37 
    38 public:
    38 public:
    39 
    39 
    40 	class Header {
    40 	/** Attribute-value pair – header, cookie, GET or POST parameter */
       
    41 	class AVP {
    41 	public:
    42 	public:
    42 		std::string name;
    43 		std::string name;
    43 		std::string value;
    44 		std::string value;
    44 
    45 
    45 		Header(std::string name, std::string value) : name(name), value(value) {
    46 		AVP(std::string name, std::string value) : name(name), value(value) {
    46 		}
    47 		}
    47 
    48 
    48 		virtual ~Header() {
    49 		virtual ~AVP() {
    49 		}
    50 		}
    50 	};
    51 	};
    51 
    52 
    52 	class Request {
    53 	class Request {
    53 	public:
    54 	public:
    54 		std::vector<Header> header;
    55 		std::vector<AVP> header;
       
    56 		std::vector<AVP> cookie;
       
    57 		std::vector<AVP> getParameter;
       
    58 		std::vector<AVP> postParameter;
    55 		std::string host;
    59 		std::string host;
    56 		std::string method;
    60 		std::string method;
    57 		std::string url;
    61 		std::string url;
    58 		std::string body;
    62 		std::string body;
    59 	};
    63 	};
    60 
    64 
    61 	class Response {
    65 	class Response {
    62 	public:
    66 	public:
    63 		std::vector<Header> header;
    67 		std::vector<AVP> header;
       
    68 		std::vector<AVP> cookie;
    64 		uint16_t code;
    69 		uint16_t code;
    65 		std::string body;
    70 		std::string body;
    66 	};
    71 	};
    67 
    72 
    68 	class RequestHandler {
    73 	class RequestHandler {