Advertisement
Guest User

Untitled

a guest
Feb 4th, 2014
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #ifndef _HTTP_HPP_
  2. #define _HTTP_HPP_
  3.  
  4. #include "util.hpp"
  5.  
  6. namespace wss {
  7.     class Request {
  8.     private:
  9.         std::string __header;
  10.         std::map<std::string,std::string> __args;
  11.     public:
  12.         Request(std::string request) {
  13.             wss::util::parse_http_request(&__header, &__args, request.c_str(), request.size());
  14.         }
  15.  
  16.         inline std::string header() {
  17.             return __header;
  18.         }
  19.  
  20.         inline std::string operator [] (std::string index) {
  21.             return __args[index];
  22.         }
  23.     };
  24. }
  25.  
  26. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement