Ported API to use response.send