test: 新增 tests 单元测试文件夹

This commit is contained in:
2025-10-01 02:37:31 +00:00
parent 648f72cb60
commit 67dff96d60
7 changed files with 1 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
#include <http/http_response.hpp>
#include <string>
#include <iostream>
int main()
{
std::string body = "Hello HTTP!";
auto builder = ouc_server::http::HttpResponse::create();
auto res =
builder.body(body)
.header("Content-Length", std::to_string(body.size()))
.header("Content-Type", "text/plain")
.build();
printf("%s\n", res.to_string().c_str());
return 0;
}