/Knowledge/sources/honojs__hono/llms-full/rpc-client--3df387a4a96c.md

RPC: Client - hono-docs

RPC: Client Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt client Summary On the Client side, import...

RPC: Client

Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#client

Summary

On the Client side, import hc and AppType first. ts import type { AppType } from '.' import { hc } from 'hono/client' hc is a function to create a client. Pass AppType as Generics and specify the server URL as an argument....

Content

On the Client side, import hc and AppType first.

import type { AppType } from '.'
import { hc } from 'hono/client'

hc is a function to create a client. Pass AppType as Generics and specify the server URL as an argument.

const client = hc<AppType>('http://localhost:8787/')

Call client.{path}.{method} and pass the data you wish to send to the server as an argument.

const res = await client.posts.$post({
  form: {
    title: 'Hello',
    body: 'Hono is a cool project',
  },
})

The res is compatible with the "fetch" Response. You can retrieve data from the server with res.json().

if (res.ok) {
  const data = await res.json()
  console.log(data.message)
}

Metadata

{
  "chunk_index": 0,
  "citation": "https://hono.dev/llms-full.txt#client",
  "coverage_role": "overview",
  "qualified_title": "Hono / llms-full / RPC > Client",
  "retrieved_at": "2026-07-02T05:51:01Z",
  "section_index": 48,
  "source_id": "/honojs/hono",
  "source_type": "llms_full",
  "target_label": "llms-full",
  "title": "RPC: Client",
  "upstream_url": "https://hono.dev/llms-full.txt",
  "version": "2026"
}
Kinic Wiki
Loading knowledge node
Details

Identity

database
db_23dhmsxlhukv
database_id
db_23dhmsxlhukv
path
/Knowledge/sources/honojs__hono/llms-full/rpc-client--3df387a4a96c.md
kind
directory
role
markdown_note
children
0

Metadata

created_at
virtual
updated_at
virtual
etag
virtual
metadata_json
{}

Lint Hints

No lightweight warnings.

Outgoing Links

No outgoing links indexed.

Incoming Links

Select a file node to inspect backlinks.

Raw Source

No raw source path inferred.