summaryrefslogtreecommitdiff
path: root/http/http_client.hpp
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2024-02-01 02:25:47 +0300
committerEd Tanous <ed@tanous.net>2024-03-19 03:27:05 +0300
commitb2896149c39967dd9d1ee79357bdc53537cfabd7 (patch)
treed63dd043c5219c7109e403189d12801a0a722e24 /http/http_client.hpp
parentc51afd54a55d5c8d6cb6e9583e209788f7996fe3 (diff)
downloadbmcweb-b2896149c39967dd9d1ee79357bdc53537cfabd7.tar.xz
Rename FileBody to HttpBody
Now that our custom body type does things more than files, it makes sense to rename it. This commit renames the header itself, then all instances of the class. Tested: Basic GET requests succeed. Change-Id: If4361ac8992fc7c268f48a336707f96e68d3576c Signed-off-by: Ed Tanous <ed@tanous.net>
Diffstat (limited to 'http/http_client.hpp')
-rw-r--r--http/http_client.hpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/http/http_client.hpp b/http/http_client.hpp
index 6f42f3ef6e..2d03487e84 100644
--- a/http/http_client.hpp
+++ b/http/http_client.hpp
@@ -16,6 +16,7 @@
#pragma once
#include "async_resolve.hpp"
+#include "http_body.hpp"
#include "http_response.hpp"
#include "logging.hpp"
#include "ssl_key_handler.hpp"
@@ -116,10 +117,10 @@ struct ConnectionPolicy
struct PendingRequest
{
- boost::beast::http::request<bmcweb::FileBody> req;
+ boost::beast::http::request<bmcweb::HttpBody> req;
std::function<void(bool, uint32_t, Response&)> callback;
PendingRequest(
- boost::beast::http::request<bmcweb::FileBody>&& reqIn,
+ boost::beast::http::request<bmcweb::HttpBody>&& reqIn,
const std::function<void(bool, uint32_t, Response&)>& callbackIn) :
req(std::move(reqIn)),
callback(callbackIn)
@@ -138,8 +139,8 @@ class ConnectionInfo : public std::enable_shared_from_this<ConnectionInfo>
uint32_t connId;
// Data buffers
- http::request<bmcweb::FileBody> req;
- using parser_type = http::response_parser<bmcweb::FileBody>;
+ http::request<bmcweb::HttpBody> req;
+ using parser_type = http::response_parser<bmcweb::HttpBody>;
std::optional<parser_type> parser;
boost::beast::flat_static_buffer<httpReadBufferSize> buffer;
Response res;
@@ -733,7 +734,7 @@ class ConnectionPool : public std::enable_shared_from_this<ConnectionPool>
const std::function<void(Response&)>& resHandler)
{
// Construct the request to be sent
- boost::beast::http::request<bmcweb::FileBody> thisReq(
+ boost::beast::http::request<bmcweb::HttpBody> thisReq(
verb, destUri.encoded_target(), 11, "", httpHeader);
thisReq.set(boost::beast::http::field::host,
destUri.encoded_host_address());