Skip to main content

source-code_snippets_7_js

return {
isTransient: true,
body: { foo: "bar" },
};

Of course, you can combine this with previously shown properties. For example:

return {
isTransient: true,
status: 201,
body: { foo: "bar" },
headers: {
"X-Custom-Header": "I am a custom header",
},
};