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>
diff --git a/test/http/http_file_body_test.cpp b/test/http/http_body_test.cpp
similarity index 76%
rename from test/http/http_file_body_test.cpp
rename to test/http/http_body_test.cpp
index 4eaa93b..6367cf9 100644
--- a/test/http/http_file_body_test.cpp
+++ b/test/http/http_body_test.cpp
@@ -1,5 +1,5 @@
 #include "file_test_utilities.hpp"
-#include "http_file_body.hpp"
+#include "http_body.hpp"
 
 #include <boost/system/error_code.hpp>
 
@@ -17,58 +17,58 @@
 namespace
 {
 
-TEST(HttpFileBodyValueType, MoveString)
+TEST(HttpHttpBodyValueType, MoveString)
 {
-    FileBody::value_type value("teststring");
+    HttpBody::value_type value("teststring");
     // Move constructor
-    FileBody::value_type value2(std::move(value));
+    HttpBody::value_type value2(std::move(value));
     EXPECT_EQ(value2.encodingType, EncodingType::Raw);
     EXPECT_EQ(value2.str(), "teststring");
     EXPECT_EQ(value2.payloadSize(), 10);
 }
 
-TEST(HttpFileBodyValueType, MoveOperatorString)
+TEST(HttpHttpBodyValueType, MoveOperatorString)
 {
-    FileBody::value_type value;
+    HttpBody::value_type value;
     value.str() = "teststring";
     // Move constructor
-    FileBody::value_type value2 = std::move(value);
+    HttpBody::value_type value2 = std::move(value);
     EXPECT_EQ(value2.encodingType, EncodingType::Raw);
     EXPECT_EQ(value2.str(), "teststring");
     EXPECT_EQ(value2.payloadSize(), 10);
 }
 
-TEST(HttpFileBodyValueType, copysignl)
+TEST(HttpHttpBodyValueType, copysignl)
 {
-    FileBody::value_type value;
+    HttpBody::value_type value;
     value.str() = "teststring";
     // Move constructor
-    FileBody::value_type value2(value);
+    HttpBody::value_type value2(value);
     EXPECT_EQ(value2.encodingType, EncodingType::Raw);
     EXPECT_EQ(value2.str(), "teststring");
     EXPECT_EQ(value2.payloadSize(), 10);
 }
 
-TEST(HttpFileBodyValueType, CopyOperatorString)
+TEST(HttpHttpBodyValueType, CopyOperatorString)
 {
-    FileBody::value_type value;
+    HttpBody::value_type value;
     value.str() = "teststring";
     // Move constructor
-    FileBody::value_type value2 = value;
+    HttpBody::value_type value2 = value;
     EXPECT_EQ(value2.encodingType, EncodingType::Raw);
     EXPECT_EQ(value2.str(), "teststring");
     EXPECT_EQ(value2.payloadSize(), 10);
 }
 
-TEST(HttpFileBodyValueType, MoveFile)
+TEST(HttpHttpBodyValueType, MoveFile)
 {
-    FileBody::value_type value(EncodingType::Base64);
+    HttpBody::value_type value(EncodingType::Base64);
     std::string filepath = makeFile("teststring");
     boost::system::error_code ec;
     value.open(filepath.c_str(), boost::beast::file_mode::read, ec);
     ASSERT_FALSE(ec);
     // Move constructor
-    FileBody::value_type value2(std::move(value));
+    HttpBody::value_type value2(std::move(value));
     std::array<char, 11> buffer{};
     size_t out = value2.file().read(buffer.data(), buffer.size(), ec);
     ASSERT_FALSE(ec);
@@ -83,15 +83,15 @@
     EXPECT_EQ(value2.payloadSize(), 16);
 }
 
-TEST(HttpFileBodyValueType, MoveOperatorFile)
+TEST(HttpHttpBodyValueType, MoveOperatorFile)
 {
-    FileBody::value_type value(EncodingType::Base64);
+    HttpBody::value_type value(EncodingType::Base64);
     std::string filepath = makeFile("teststring");
     boost::system::error_code ec;
     value.open(filepath.c_str(), boost::beast::file_mode::read, ec);
     ASSERT_FALSE(ec);
     // Move constructor
-    FileBody::value_type value2 = std::move(value);
+    HttpBody::value_type value2 = std::move(value);
     std::array<char, 11> buffer{};
     size_t out = value2.file().read(buffer.data(), buffer.size(), ec);
     ASSERT_FALSE(ec);
@@ -105,9 +105,9 @@
     EXPECT_EQ(value2.payloadSize(), 16);
 }
 
-TEST(HttpFileBodyValueType, SetFd)
+TEST(HttpBodyValueType, SetFd)
 {
-    FileBody::value_type value(EncodingType::Base64);
+    HttpBody::value_type value(EncodingType::Base64);
     std::string filepath = makeFile("teststring");
 
     boost::system::error_code ec;
diff --git a/test/http/http_response_test.cpp b/test/http/http_response_test.cpp
index c5bfbdc..457cd7a 100644
--- a/test/http/http_response_test.cpp
+++ b/test/http/http_response_test.cpp
@@ -2,6 +2,7 @@
 #include "boost/beast/core/flat_buffer.hpp"
 #include "boost/beast/http/serializer.hpp"
 #include "file_test_utilities.hpp"
+#include "http/http_body.hpp"
 #include "http/http_response.hpp"
 
 #include <filesystem>
@@ -24,11 +25,11 @@
     EXPECT_EQ(res.result(), boost::beast::http::status::ok);
 }
 
-std::string getData(boost::beast::http::response<bmcweb::FileBody>& m)
+std::string getData(boost::beast::http::response<bmcweb::HttpBody>& m)
 {
     std::string ret;
 
-    boost::beast::http::response_serializer<bmcweb::FileBody> sr{m};
+    boost::beast::http::response_serializer<bmcweb::HttpBody> sr{m};
     sr.split(true);
 
     auto reader = [&sr, &ret](const boost::system::error_code& ec2,
@@ -73,7 +74,7 @@
     EXPECT_EQ(*res.body(), bodyvalue);
     verifyHeaders(res);
 }
-TEST(HttpResponse, FileBody)
+TEST(HttpResponse, HttpBody)
 {
     crow::Response res;
     addHeaders(res);
@@ -83,7 +84,7 @@
     verifyHeaders(res);
     std::filesystem::remove(path);
 }
-TEST(HttpResponse, FileBodyWithFd)
+TEST(HttpResponse, HttpBodyWithFd)
 {
     crow::Response res;
     addHeaders(res);
@@ -95,7 +96,7 @@
     std::filesystem::remove(path);
 }
 
-TEST(HttpResponse, Base64FileBodyWithFd)
+TEST(HttpResponse, Base64HttpBodyWithFd)
 {
     crow::Response res;
     addHeaders(res);
@@ -145,7 +146,7 @@
     testFileData(res, data);
 }
 
-TEST(HttpResponse, Base64FileBodyWriter)
+TEST(HttpResponse, Base64HttpBodyWriter)
 {
     crow::Response res;
     std::string data = "sample text";
@@ -157,7 +158,7 @@
     std::filesystem::remove(path);
 }
 
-TEST(HttpResponse, Base64FileBodyWriterLarge)
+TEST(HttpResponse, Base64HttpBodyWriterLarge)
 {
     crow::Response res;
     std::string data = generateBigdata();
@@ -174,7 +175,7 @@
     std::filesystem::remove(path);
 }
 
-TEST(HttpResponse, FileBodyWriterLarge)
+TEST(HttpResponse, HttpBodyWriterLarge)
 {
     crow::Response res;
     std::string data = generateBigdata();