Skip to content

Commit dcef068

Browse files
committed
add unit test for http2 connection
libcurl handles http2 connections transparently. So this just puts a unit test in place to make sure it doesn't break with configuration changes or anything like that. fixes mrtazz#49
1 parent 2b0399f commit dcef068

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/test_restclient.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ TEST_F(RestClientTest, TestRestClientGETCode)
6464
RestClient::Response res = RestClient::get("http://httpbin.org/get");
6565
EXPECT_EQ(200, res.code);
6666
}
67+
TEST_F(RestClientTest, TestRestClientGETHTTP2Code)
68+
{
69+
RestClient::Response res = RestClient::get("https://http2.golang.org/reqinfo");
70+
EXPECT_EQ(200, res.code);
71+
}
6772
TEST_F(RestClientTest, TestRestClientGETBodyCode)
6873
{
6974
RestClient::Response res = RestClient::get("http://httpbin.org/get");

0 commit comments

Comments
 (0)