---
lang: en
title: 'API docs: testlab.stubserverresponse'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/testlab
permalink: /doc/en/lb4/apidocs.testlab.stubserverresponse.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/testlab](./testlab.md) &gt; [stubServerResponse](./testlab.stubserverresponse.md)

## stubServerResponse() function

**Signature:**

```typescript
export declare function stubServerResponse(request: IncomingMessage, onEnd: ShotCallback): ServerResponse;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

request


</td><td>

IncomingMessage


</td><td>


</td></tr>
<tr><td>

onEnd


</td><td>

[ShotCallback](./testlab.shotcallback.md)


</td><td>


</td></tr>
</tbody></table>

**Returns:**

ServerResponse


