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

Function ProxyAddRequest

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

Source from the content-addressed store, hash-verified

1636}
1637
1638static void ProxyAddRequest(bool secure, int port)
1639{
1640 char url[128];
1641 char proxy_url[128];
1642 MakeLocalUrl(url, sizeof(url), secure, port);
1643 MakeLocalProxyUrl(proxy_url, sizeof(proxy_url));
1644
1645 ProxyRequestHelper helper(url, proxy_url);
1646 ASSERT_TRUE(helper.IsValid());
1647
1648 dmHttpClient::Result r = helper.Get("/add/10/20");
1649 ASSERT_EQ(dmHttpClient::RESULT_OK, r);
1650 ASSERT_EQ(200, helper.m_StatusCode);
1651 ASSERT_EQ(30, strtol(helper.m_Content.c_str(), 0, 10));
1652}
1653
1654static void ProxyCloseReusedDoesNotLeakPoolHandles(bool secure, int port, uint32_t iterations)
1655{

Callers 1

TESTFunction · 0.85

Calls 4

MakeLocalUrlFunction · 0.85
MakeLocalProxyUrlFunction · 0.85
IsValidMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected