Search.../

body

Sets or gets the body of the response as a string, object or binary buffer.

Type:

string

 | 

Buffer

 | 

Object
Read & Write

Was this helpful?

Get the response body

Copy Code
1// In http-functions.js
2
3export function use_myFunction(request) {
4
5 let body = response.body; // "body text"
6
7}
Set the response body

Copy Code
1// In http-functions.js
2
3export function use_myFunction(request) {
4
5 response.body = "body text";
6
7}