/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-client-eecd389c26e6-client-s0048-c0000.md

Client - hono-docs

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

Client

Source evidence: /Sources/raw/honojshono/honojshono.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)
}
Kinic Wiki
Loading knowledge node
Details

Identity

database
db_23dhmsxlhukv
database_id
db_23dhmsxlhukv
path
/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-client-eecd389c26e6-client-s0048-c0000.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.