mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 01:08:27 +00:00
Improved Client2 interface
This commit is contained in:
parent
bbb83d12c1
commit
63a96aeb20
2 changed files with 45 additions and 19 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue