#include <HTTPArchive.h>
Definition at line 22 of file HTTPArchive.h.
std::vector< std::vector< HPACKHeader > > proxygen::HTTPArchive::convertToHPACK |
( |
const std::vector< HTTPMessage > & |
msgs | ) |
|
|
static |
Definition at line 148 of file HTTPArchive.cpp.
References buffer(), proxygen::HTTPMessage::getHeaders(), i, folly::parseJson(), proxygen::readFileToIOBuf(), and proxygen::HTTPHeaders::size().
149 unique_ptr<HTTPArchive> har = std::make_unique<HTTPArchive>();
155 auto entries = jsonObj[
"log"][
"entries"];
157 for (
size_t i = 0;
i < entries.size();
i++) {
158 HTTPMessage msg = extractMessage(entries[
i][
"request"],
159 entries[i][
"startedDateTime"].asString(),
161 if (msg.getHeaders().size() != 0) {
162 har->requests.push_back(msg);
164 msg = extractMessage(entries[i][
"response"],
"",
false);
165 if (msg.getHeaders().size() != 0) {
166 har->responses.push_back(msg);
std::vector< uint8_t > buffer(kBufferSize+16)
dynamic parseJson(StringPiece range)
std::unique_ptr< IOBuf > readFileToIOBuf(const std::string &filename)
Definition at line 182 of file HTTPArchive.cpp.
References folly::size(), and uint32_t.
185 for (
const auto& header : headers) {
186 size += header.name.size() + header.value.size() + 2;
constexpr auto size(C const &c) -> decltype(c.size())
std::vector<HTTPMessage> proxygen::HTTPArchive::requests |
std::vector<HTTPMessage> proxygen::HTTPArchive::responses |
The documentation for this class was generated from the following files: