24 "content-type: application/json\r\n"
25 "content-length: 59\r\n"
26 "date: Fri, 01 Nov 2024 23:53:02 GMT\r\n"
27 "access-control-allow-origin: *\r\n"
28 "server: gunicorn\r\n"
29 "x-cache: Miss from cloudfront\r\n"
30 "via: 1.1 4a628119373a320de50f1e6bc0e5f87a.cloudfront.net "
32 "x-amz-cf-pop: SFO5-P2\r\n"
34 "t9EARJ8Hsu4FipZqiiVhsjwEU29sICEwjA7XMJNIOEXgOnJA-TlhdA==\r\n"
37 " \"hello\": \"I'm alive and healthy! Super healthy :D\"\r\n"
40 std::string resp_data =
42 " \"hello\": \"I'm alive and healthy! Super healthy :D\"\r\n"
47 TEST_ASSERT_EQUAL_STRING(
"HTTP/2", client.
Version().c_str());
50 TEST_ASSERT_EQUAL_STRING(
"application/json",
51 client.
Header(
"content-type").c_str());
52 TEST_ASSERT_EQUAL_STRING(
"59", client.
Header(
"content-length").c_str());
53 TEST_ASSERT_EQUAL_STRING(
"Fri, 01 Nov 2024 23:53:02 GMT",
54 client.
Header(
"date").c_str());
56 TEST_ASSERT_EQUAL_STRING(resp_data.c_str(), client.
Data().c_str());
void TestHttpClient(void)