Added option to customize HTTP response.