mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-11-15 19:13:39 +00:00
Fix #127
This commit is contained in:
1 parent
3d1ae3a3af
commit
eaafa5d55c
3 files changed
+57
-7
No files matched your search
+3
-2
@@ -327,8 +327,9 @@ TEST(BaseAuthTest, FromHTTPWatch) {
|
||||
}
|
||||
|
||||
{
|
||||
httplib::Headers headers = {{"Authorization", "Basic aGVsbG86d29ybGQ="}};
|
||||
auto res = cli.Get("/basic-auth/hello/world", headers);
|
||||
auto res = cli.Get("/basic-auth/hello/world", {
|
||||
httplib::make_basic_authentication_header("hello", "world")
|
||||
});
|
||||
ASSERT_TRUE(res != nullptr);
|
||||
EXPECT_EQ(res->body,
|
||||
"{\n \"authenticated\": true, \n \"user\": \"hello\"\n}\n");
|
||||
|
||||
Reference in new issue
Block a user