text( )


Reads the response body as a string.

The text() function reads the body response stream to its completion and formats the data as a string. It returns a Promise that resolves to the response body as a string.

Method Declaration
Copy
function text(): Promise<string>;
Request
This method does not take any parameters
Returns
Return Type:Promise<string>
JavaScript
let text = httpResponse.text(); // {"key": "some value"}
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?