respondOrNoContent

inline suspend fun <T : Any> ERROR CLASS: Symbol not found for ApplicationCall.respondOrNoContent(data: T?)(source)

Responds with the given data if it's not null, or responds with HttpStatusCode.NoContent (204) if it's null. This is useful for API endpoints that may return empty results.

Parameters

data

The data to respond with, or null to respond with No Content

Type Parameters

T

The type of data to respond with