aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/http/server/http_ex.h
blob: 39cfbbe66f8bd47f35da2393d5d731b424cb9873 (plain) (blame)
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
28
#pragma once 
 
#include "http.h" 
 
#include <library/cpp/http/misc/httpreqdata.h>
 
class THttpClientRequestExtension: public TClientRequest { 
public:
    bool Parse(char* req, TBaseServerRequestData& rd);
    bool ProcessHeaders(TBaseServerRequestData& rd, TBlob& postData);
};
 
template <class TRequestData>
class THttpClientRequestExtImpl: public THttpClientRequestExtension { 
protected: 
    bool Parse(char* req) {
        return THttpClientRequestExtension::Parse(req, RD);
    }
    bool ProcessHeaders() {
        return THttpClientRequestExtension::ProcessHeaders(RD, Buf);
    }
 
protected:
    TRequestData RD;
    TBlob Buf; 
}; 

using THttpClientRequestEx = THttpClientRequestExtImpl<TServerRequestData>;