169 {
170 FL_WARN(
"\n=== Test 3: GET /ping (Health Check) ===");
171
174
179 return;
180 }
181
183 if (resp.
status() != 200) {
187 return;
188 }
189
191 if (body != "pong\n") {
192 FL_WARN(
"✗ FAILED: Expected 'pong\\n', got '" << body <<
"'");
195 return;
196 }
197
201}
fl::size length() const FL_NOEXCEPT
const fl::string & text() const
Response body as text (like JavaScript response.text())
const fl::string & status_text() const
HTTP status text (like JavaScript response.statusText)
int status() const
HTTP status code (like JavaScript response.status)
HTTP response class (unified interface)
string substr(fl::size start, fl::size length) const FL_NOEXCEPT
Promise class that provides fluent .then() and .catch_() semantics This is a lightweight wrapper arou...
Result type for promise operations.
fl::task::Promise< Response > fetch_get(const fl::string &url, const FetchOptions &request)
HTTP GET request.
PromiseResult< T > await_top_level(Promise< T > p)
Synchronously wait for a promise to complete (ONLY safe in top-level contexts)
expected< T, E > result
Alias for expected (Rust-style naming)