Skip to main content

getResponse

Stentor API Reference


Stentor API Reference / stentor-response/src / getResponse

Function: getResponse()

getResponse(content, request, context, additionalContext?, macros?): Response

Defined in: packages/stentor-response/src/getResponse.ts:22

Get the compiled response from the provided content, request and context.

In order to leverage slot filling, you must pass in a Handler for content.

Parameters​

content​

Content | Response[] | Handler\<Content, Data, Forward, Redirect>

request​

Request

context​

Context

additionalContext?​

Record\<string, unknown>

Additional variables that can be injected to be used during compilation.

macros?​

MacroMap

Custom macros that are using either in compiling the response or determining the response with conditionals

Returns​

Response