summaryrefslogtreecommitdiff
path: root/test/RequestToString.cc
blob: c922c3beae17420876b56ec91b62184a44207676 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef _D_REQUEST_TO_STRING_H_
#define _D_REQUEST_TO_STRING_H_
#include "Util.h"
#include "Request.h"
#include <string>

using namespace std;

class RequestToString {
private:
  Request* req;
public:
  
  RequestToString(Request* req) {
    this->req = req;
  }

  string toString() {
    return "url = "+req->url+"\n"+
      "protocol = "+req->protocol+"\n"+
      "host = "+req->host+"\n"+
      "port = "+Util::ulitos(req->port)+"\n"+
      "dir = "+req->dir+"\n"+
      "file = "+req->file;
  }

#endif // _D_REQUEST_TO_STRING_H_