WebResponse interface

Framework-agnostic response surface used by the hosting layer.

Remarks

This interface describes the minimal subset of an HTTP response object that CloudAdapter.process and authorizeJWT need at runtime. Any framework whose response object structurally satisfies this shape is compatible — including Express's Response, and adapter classes such as FastifyReplyAdapter from @microsoft/agents-hosting-fastify.

Keeping this contract in the core hosting package means the hosting layer no longer needs to import types from express at compile time.

Property Details

headersSent

headersSent: boolean

Property Value

boolean

writableEnded

writableEnded: boolean

Property Value

boolean

Method Details

end()

function end(): this

Returns

this

send(unknown)

function send(body?: unknown): this

Parameters

body

unknown

Returns

this

setHeader(string, string)

function setHeader(name: string, value: string): this

Parameters

name

string

value

string

Returns

this

status(number)

function status(code: number): this

Parameters

code

number

Returns

this