***

title: handleRequest
slug: /reference/typescript/agents/configuration/serverless-adapter/handle-request
description: Route a serverless event through the Hono app and return a normalized response.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

Convert a serverless event into a standard `Request`, route it through the Hono
app, and return a normalized `ServerlessResponse`.

## **Parameters**

<ParamField path="app" type="{ fetch: (req: Request) => Promise<Response> }" required={true} toc={true}>
  A Hono-compatible application with a `fetch` method.
</ParamField>

<ParamField path="event" type="ServerlessEvent" required={true} toc={true}>
  The incoming serverless event. Properties include `httpMethod`, `method`,
  `headers`, `body`, `path`, `rawPath`, and `queryStringParameters`.
</ParamField>

## **Returns**

`Promise<ServerlessResponse>` -- A normalized response with `statusCode`,
`headers`, and `body`.

## **Example**

```typescript {5}
import { ServerlessAdapter } from '@signalwire/sdk';

const adapter = new ServerlessAdapter('lambda');

const response = await adapter.handleRequest(app, lambdaEvent);
console.log(response.statusCode, response.body);
```