Skip to content
Back to skills

Orpc Rpc Handler

ASecurity

Comprehensive Guide to the RPCHandler in oRPC.

  • 8 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 12, 2026
businessgit

Works with

  • cli

Security analysis

A100/100

Scanned September 12, 2026

npx -y skills add ali-master/skills --skill orpc-rpc-handler --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Orpc Rpc Handler?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Orpc Rpc Handler
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ali-master-orpc-rpc-handler/badge)](https://www.skillsdirectory.com/skills/ali-master-orpc-rpc-handler)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: oRPC RPC Handler
description: Comprehensive Guide to the RPCHandler in oRPC.
license: MIT
metadata:
  author: Ali Torki
  homepage: https://github.com/ali-master
  version: "1.0.0"
---

# RPC Handler

`RPCHandler` enables communication with clients over oRPC's proprietary [RPC protocol](/docs/advanced/rpc-protocol).

> Designed exclusively for [RPCLink](/docs/client/rpc-link). Avoid sending requests manually.

## Supported Data Types

* **string**, **number** (including `NaN`)
* **boolean**, **null**, **undefined**
* **Date** (including `Invalid Date`)
* **BigInt**, **RegExp**, **URL**
* **Record (object)**, **Array**
* **Set**, **Map**
* **Blob** (unsupported in `AsyncIteratorObject`)
* **File** (unsupported in `AsyncIteratorObject`)
* **AsyncIteratorObject** (only at root level; powers [Event Iterator](/docs/event-iterator))

## Setup

```ts
import { RPCHandler } from '@orpc/server/fetch'
import { CORSPlugin } from '@orpc/server/plugins'
import { onError } from '@orpc/server'

const handler = new RPCHandler(router, {
  plugins: [new CORSPlugin()],
  interceptors: [onError(e => console.error(e))],
})

export default async function fetch(request: Request) {
  const { matched, response } = await handler.handle(request, {
    prefix: '/rpc',
    context: {}
  })

  if (matched) return response
  return new Response('Not Found', { status: 404 })
}
```

## Filtering Procedures

```ts
const handler = new RPCHandler(router, {
  filter: ({ contract, path }) => !contract['~orpc'].route.tags?.includes('internal'),
})
```

## Default Plugins

| Plugin                                                   | Applies To                          | Toggle Option                  |
| -------------------------------------------------------- | ----------------------------------- | ------------------------------ |
| [StrictGetMethodPlugin](/docs/plugins/strict-get-method) | HTTP Adapter                        | `strictGetMethodPluginEnabled` |

## Lifecycle

```mermaid
sequenceDiagram
  actor A1 as Client
  participant P3 as Request/Response encoder
  participant P4 as Router + Input/Output encoder
  participant P5 as Server-Side Procedure Client

  A1 ->> P3: request
  P3 ->> P4: standard request
  P4 ->> P4: Find procedure
  P4 ->> P4: Load body + decode request
  P4 ->> P5: Input, Signal, LastEventId,...
  P5 ->> P5: Handle
  P5 ->> P4: success/failure
  P4 ->> P3: standard response
  P3 ->> A1: response
```

Interceptors can intercept and modify the lifecycle at various stages.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.