@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
81 lines (41 loc) • 1.27 kB
Markdown
---
lang: en
title: 'API docs: rest.writeresulttoresponse'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/rest
permalink: /doc/en/lb4/apidocs.rest.writeresulttoresponse.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/rest](./rest.md) > [writeResultToResponse](./rest.writeresulttoresponse.md)
## writeResultToResponse() function
Writes the result from Application controller method into the HTTP response
**Signature:**
```typescript
export declare function writeResultToResponse(response: Response, result: OperationRetval): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td markdown="1">
response
</td><td markdown="1">
Response
</td><td markdown="1">
HTTP Response
</td></tr>
<tr><td markdown="1">
result
</td><td markdown="1">
[OperationRetval](./rest.operationretval.md)
</td><td markdown="1">
Result from the API to write into HTTP Response
</td></tr>
</tbody></table>
**Returns:**
void