MCPcopy Create free account
hub / github.com/defold/defold / TlsProtocolRequest

Function TlsProtocolRequest

engine/dlib/src/test/test_httpclient.cpp:1590–1609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1588}
1589
1590static void TlsProtocolRequest(int port, const char* expected_protocol)
1591{
1592 ASSERT_NE(-1, port);
1593
1594 char url[128];
1595 MakeLocalUrl(url, sizeof(url), true, port);
1596
1597 DirectRequestHelper helper(url);
1598 ASSERT_TRUE(helper.IsValid());
1599
1600 dmHttpClient::Result r = helper.Get("/tls-info");
1601 ASSERT_EQ(dmHttpClient::RESULT_OK, r);
1602 ASSERT_EQ(200, helper.m_StatusCode);
1603 ASSERT_STREQ(expected_protocol, helper.m_Content.c_str());
1604
1605 r = helper.Get("/add/10/20");
1606 ASSERT_EQ(dmHttpClient::RESULT_OK, r);
1607 ASSERT_EQ(200, helper.m_StatusCode);
1608 ASSERT_EQ(30, strtol(helper.m_Content.c_str(), 0, 10));
1609}
1610
1611static void TlsProtocolRequestOrDarwinUnsupported(int port, const char* expected_protocol)
1612{

Callers 1

TESTFunction · 0.85

Calls 3

MakeLocalUrlFunction · 0.85
IsValidMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected