proxygen
HTTPArchive.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree. An additional grant
7  * of patent rights can be found in the PATENTS file in the same directory.
8  *
9  */
10 #pragma once
11 
12 #include <folly/Memory.h>
13 #include <folly/dynamic.h>
14 #include <memory>
17 #include <string>
18 #include <vector>
19 
20 namespace proxygen {
21 
22 class HTTPArchive {
23  public:
24  std::vector<HTTPMessage> requests;
25  std::vector<HTTPMessage> responses;
26 
27  static std::vector<std::vector<HPACKHeader>> convertToHPACK(
28  const std::vector<HTTPMessage>& msgs);
29 
30  static std::unique_ptr<HTTPArchive> fromFile(const std::string& filename);
31 
32  static std::unique_ptr<HTTPArchive> fromPublicFile(const std::string& fname);
33 
34  static uint32_t getSize(const HTTPMessage& msg);
35  static uint32_t getSize(const std::vector<HPACKHeader>& headers);
36 };
37 }
static uint32_t getSize(const HTTPMessage &msg)
static std::vector< std::vector< HPACKHeader > > convertToHPACK(const std::vector< HTTPMessage > &msgs)
static std::unique_ptr< HTTPArchive > fromPublicFile(const std::string &fname)
std::vector< HTTPMessage > responses
Definition: HTTPArchive.h:25
static std::unique_ptr< HTTPArchive > fromFile(const std::string &filename)
const char * string
Definition: Conv.cpp:212
std::vector< HTTPMessage > requests
Definition: HTTPArchive.h:24