mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-11-16 19:20:50 +00:00
Improved Client2 interface
This commit is contained in:
1 parent
bbb83d12c1
commit
63a96aeb20
2 files changed
+45
-19
No files matched your search
+4
-3
@@ -674,10 +674,11 @@ TEST(HttpsToHttpRedirectTest, Redirect) {
|
||||
}
|
||||
|
||||
TEST(HttpsToHttpRedirectTest2, Redirect) {
|
||||
httplib::Client2 cli("https://httpbin.org");
|
||||
cli.set_follow_location(true);
|
||||
auto res =
|
||||
cli.Get("/redirect-to?url=http%3A%2F%2Fwww.google.com&status_code=302");
|
||||
httplib::Client2("https://httpbin.org")
|
||||
.set_follow_location(true)
|
||||
.Get("/redirect-to?url=http%3A%2F%2Fwww.google.com&status_code=302");
|
||||
|
||||
ASSERT_TRUE(res != nullptr);
|
||||
EXPECT_EQ(200, res->status);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user