---
lang: en
title: 'API docs: rest.writeresulttoresponse'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/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) &gt; [@loopback/rest](./rest.md) &gt; [writeResultToResponse](./rest.writeresulttoresponse.md)

## writeResultToResponse() function

Writes the result from Application controller method into the HTTP response

<b>Signature:</b>

```typescript
export declare function writeResultToResponse(response: Response, result: OperationRetval): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  response | Response | HTTP Response |
|  result | [OperationRetval](./rest.operationretval.md) | Result from the API to write into HTTP Response |

<b>Returns:</b>

void


