Skip to content

Commit 6c3dc72

Browse files
committed
refactor: remove unused HTML content server constructor from HttpServer
- Deleted the constructor that served a single HTML content, as it was no longer needed. - Updated the header file to reflect the removal of the constructor. Signed-off-by: Y.Hisaki <yhisaki31@gmail.com>
1 parent ecc8595 commit 6c3dc72

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

src/detail/http_server.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,6 @@ HttpServer::HttpServer(const std::filesystem::path &directory) : _server() {
2626
setupCommon();
2727
}
2828

29-
HttpServer::HttpServer(const std::string_view htmlContent) : _server() {
30-
_server.Get(
31-
"/",
32-
[htmlContent](const httplib::Request &, httplib::Response &res) -> void {
33-
res.set_content(std::string(htmlContent), "text/html");
34-
});
35-
setupCommon();
36-
}
37-
3829
HttpServer::~HttpServer() { stop(); }
3930

4031
void HttpServer::start() {

src/detail/http_server.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ class HttpServer {
4141
*/
4242
explicit HttpServer(const std::filesystem::path &directory);
4343

44-
/**
45-
* @brief Construct a server serving a single HTML content
46-
* @param htmlContent The HTML content to serve
47-
*/
48-
explicit HttpServer(std::string_view htmlContent);
49-
5044
/**
5145
* @brief Destructor
5246
*/

0 commit comments

Comments
 (0)