We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 240cc85 commit 2b7a968Copy full SHA for 2b7a968
test/test.cc
@@ -649,6 +649,19 @@ TEST(YahooRedirectTest, Redirect) {
649
EXPECT_EQ(200, res->status);
650
}
651
652
+TEST(YahooRedirectTestWithURL, Redirect) {
653
+ auto res = httplib::url::Get("http://yahoo.com");
654
+ ASSERT_TRUE(res != nullptr);
655
+ EXPECT_EQ(301, res->status);
656
+
657
+ httplib::url::options options;
658
+ options.follow_location = true;
659
660
+ res = httplib::url::Get("http://yahoo.com", options);
661
662
+ EXPECT_EQ(200, res->status);
663
+}
664
665
TEST(HttpsToHttpRedirectTest, Redirect) {
666
httplib::SSLClient cli("httpbin.org");
667
cli.set_follow_location(true);
0 commit comments