ServerSSRRenderer
class ServerSSRRenderer(body: BODY, handler: ElideController, request: HttpRequest<*>, script: ExecutableScript, buffer: StringBuilder = StringBuilder(), job: AtomicReference<Job?> = AtomicReference(null)) : SuspensionRenderer<ByteArrayOutputStream>
Renderer class which executes JavaScript via SSR and provides the resulting response to Micronaut.
Constructors
Link copied to clipboard
constructor(body: BODY, handler: ElideController, request: HttpRequest<*>, script: ExecutableScript, buffer: StringBuilder = StringBuilder(), job: AtomicReference<Job?> = AtomicReference(null))
Functions
Link copied to clipboard
Render the attached script and return the resulting content as a ByteArrayOutputStream, built from the result of renderSuspendAsync.
Link copied to clipboard
suspend fun renderResponse(response: MutableHttpResponse<ByteArrayOutputStream>): MutableHttpResponse<ByteArrayOutputStream>
Render the attached script into a ByteArrayOutputStream, and wrap it in a Micronaut MutableHttpResponse provided at response.
Link copied to clipboard