@@ -524,7 +524,7 @@ TEST(AbsoluteRedirectTest, Redirect) {
524
524
httplib::Client cli (host);
525
525
#endif
526
526
527
- cli.follow_location (true );
527
+ cli.set_follow_location (true );
528
528
auto res = cli.Get (" /absolute-redirect/3" );
529
529
ASSERT_TRUE (res != nullptr );
530
530
EXPECT_EQ (200 , res->status );
@@ -539,7 +539,7 @@ TEST(RedirectTest, Redirect) {
539
539
httplib::Client cli (host);
540
540
#endif
541
541
542
- cli.follow_location (true );
542
+ cli.set_follow_location (true );
543
543
auto res = cli.Get (" /redirect/3" );
544
544
ASSERT_TRUE (res != nullptr );
545
545
EXPECT_EQ (200 , res->status );
@@ -554,7 +554,7 @@ TEST(RelativeRedirectTest, Redirect) {
554
554
httplib::Client cli (host);
555
555
#endif
556
556
557
- cli.follow_location (true );
557
+ cli.set_follow_location (true );
558
558
auto res = cli.Get (" /relative-redirect/3" );
559
559
ASSERT_TRUE (res != nullptr );
560
560
EXPECT_EQ (200 , res->status );
@@ -569,7 +569,7 @@ TEST(TooManyRedirectTest, Redirect) {
569
569
httplib::Client cli (host);
570
570
#endif
571
571
572
- cli.follow_location (true );
572
+ cli.set_follow_location (true );
573
573
auto res = cli.Get (" /redirect/21" );
574
574
ASSERT_TRUE (res == nullptr );
575
575
}
@@ -582,15 +582,15 @@ TEST(YahooRedirectTest, Redirect) {
582
582
ASSERT_TRUE (res != nullptr );
583
583
EXPECT_EQ (301 , res->status );
584
584
585
- cli.follow_location (true );
585
+ cli.set_follow_location (true );
586
586
res = cli.Get (" /" );
587
587
ASSERT_TRUE (res != nullptr );
588
588
EXPECT_EQ (200 , res->status );
589
589
}
590
590
591
591
TEST (HttpsToHttpRedirectTest, Redirect) {
592
592
httplib::SSLClient cli (" httpbin.org" );
593
- cli.follow_location (true );
593
+ cli.set_follow_location (true );
594
594
auto res =
595
595
cli.Get (" /redirect-to?url=http%3A%2F%2Fwww.google.com&status_code=302" );
596
596
ASSERT_TRUE (res != nullptr );
@@ -1535,7 +1535,7 @@ TEST_F(ServerTest, PutWithContentProvider) {
1535
1535
1536
1536
#ifdef CPPHTTPLIB_ZLIB_SUPPORT
1537
1537
TEST_F (ServerTest, PutWithContentProviderWithGzip) {
1538
- cli_.compress (true );
1538
+ cli_.set_compress (true );
1539
1539
auto res = cli_.Put (
1540
1540
" /put" , 3 ,
1541
1541
[](size_t /* offset*/ , size_t /* length*/ , DataSink sink) {
@@ -1549,7 +1549,7 @@ TEST_F(ServerTest, PutWithContentProviderWithGzip) {
1549
1549
}
1550
1550
1551
1551
TEST_F (ServerTest, PutLargeFileWithGzip) {
1552
- cli_.compress (true );
1552
+ cli_.set_compress (true );
1553
1553
auto res = cli_.Put (" /put-large" , LARGE_DATA, " text/plain" );
1554
1554
1555
1555
ASSERT_TRUE (res != nullptr );
@@ -1623,7 +1623,7 @@ TEST_F(ServerTest, PostMulitpartFilsContentReceiver) {
1623
1623
}
1624
1624
1625
1625
TEST_F (ServerTest, PostContentReceiverGzip) {
1626
- cli_.compress (true );
1626
+ cli_.set_compress (true );
1627
1627
auto res = cli_.Post (" /content_receiver" , " content" , " text/plain" );
1628
1628
ASSERT_TRUE (res != nullptr );
1629
1629
ASSERT_EQ (200 , res->status );
@@ -1805,7 +1805,7 @@ TEST_F(ServerTest, MultipartFormDataGzip) {
1805
1805
{" key2" , " --abcdefg123" , " " , " " },
1806
1806
};
1807
1807
1808
- cli_.compress (true );
1808
+ cli_.set_compress (true );
1809
1809
auto res = cli_.Post (" /gzipmultipart" , items);
1810
1810
1811
1811
ASSERT_TRUE (res != nullptr );
0 commit comments