CCF
Loading...
Searching...
No Matches
http_proc.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
6#include "http2_types.h"
7#include "http_builder.h"
8
9#include <algorithm>
10#include <cctype>
11#include <endian.h>
12#include <llhttp/llhttp.h>
13#include <map>
14#include <queue>
15#include <string>
16
17namespace http
18{
20 {
21 public:
22 virtual ~RequestProcessor() = default;
23
24 virtual void handle_request(
25 llhttp_method method,
26 const std::string_view& url,
27 ccf::http::HeaderMap&& headers,
28 std::vector<uint8_t>&& body,
29 int32_t stream_id = http2::DEFAULT_STREAM_ID) = 0;
30 };
31
33 {
34 public:
35 virtual ~ResponseProcessor() = default;
36
37 virtual void handle_response(
38 ccf::http_status status,
39 ccf::http::HeaderMap&& headers,
40 std::vector<uint8_t>&& body) = 0;
41 };
42}
Definition http_proc.h:20
virtual void handle_request(llhttp_method method, const std::string_view &url, ccf::http::HeaderMap &&headers, std::vector< uint8_t > &&body, int32_t stream_id=http2::DEFAULT_STREAM_ID)=0
virtual ~RequestProcessor()=default
Definition http_proc.h:33
virtual ~ResponseProcessor()=default
virtual void handle_response(ccf::http_status status, ccf::http::HeaderMap &&headers, std::vector< uint8_t > &&body)=0
std::map< std::string, std::string, std::less<> > HeaderMap
Definition http_header_map.h:10
llhttp_status http_status
Definition http_status.h:9
Definition error_reporter.h:6