> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# fetch()

> **fetch**(`req`): `Promise`\<`Response`>

Route one HTTP request: `POST …/rpc/<method>` dispatches an RPC, any
other GET opens an SSE stream, anything else is refused with 405.

**Parameters**

| Parameter | Type | Description |
| - | - | - |
| `req` | `Request` | The inbound request. |

**Returns**

`Promise`\<`Response`>

The SSE stream, the RPC answer, or an error response.

## The Actor Entry

The actor's [`fetch(req)`](/docs/edge-compute/stateful-actors/api-reference/base#fetch-req) entry calls it, from an override on the class. [The HTTP Server](/docs/agent-sdk/internals/the-http-server#the-fetch-entry) shows the method.
