HttpResponse.bodyAsString

string bodyAsString() const

Returns the body as a string.

Warning: This method assumes the body is valid UTF-8. For bodies with other encodings (e.g., Latin-1), use the raw body field and decode appropriately based on the Content-Type header.

Returns

The body interpreted as a UTF-8 string. If the body contains

invalid UTF-8 sequences, the returned string may be malformed.