---
url: >-
  https://lit-ui-router.dev/reference/ui-router-server/fetch/type-aliases/FetchHandler.md
---
[ui-router-server](../../index.md) / [fetch](../index.md) / FetchHandler

# Type Alias: FetchHandler\<Args>

```ts
type FetchHandler<Args> = (request, ...args) => Promise<
  | Response
| null>;
```

Defined in: [fetch.ts:60](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/fetch.ts#L60)

The WinterCG handler: a verdict answered, or `null` to pass to the host.
`args` (a Worker's `env` and `ctx`) are forwarded to a delegate untouched.

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
|  `Args` *extends* `unknown`\[] | \[] |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `request` | [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request) |
| ...`args` | `Args` |

## Returns

`Promise`<
| [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
| `null`>
