/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-client-eecd389c26e6-client-s0530-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 Next, The client side imple...
Client
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#client
Summary
Next, The client-side implementation. Create a client object by passing the AppType type to hc as generics. Then, magically, completion works and the endpoint path and request type are suggested. ```ts import ty...
Content
Next, The client-side implementation.
Create a client object by passing the AppType type to hc as generics.
Then, magically, completion works and the endpoint path and request type are suggested.
import type { AppType } from './server'
import { hc } from 'hono/client'
const client = hc<AppType>('/api')
const res = await client.hello.$get({
query: {
name: 'Hono',
},
})The Response is compatible with the fetch API, but the data that can be retrieved with json() has a type.
const data = await res.json()
console.log(`${data.message}`)Sharing API specifications means that you can be aware of server-side changes.