Skip to main content

apiCreatedResponse

apiCreatedResponse<TBody>(resData, headers?): Response

Sends a response with HTTP status code 201 (Created) and the provided data.

Type Parameters

TBody

TBody

Parameters

resData

TBody = ...

The response data to be sent to the client (defaults to null).

headers?

HeadersInit

Optional headers to include in the response.

Returns

Response