/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-init-option-2aa26bac0ce2-init-option-s0057-c0000.md
`init` option - hono-docs
init option Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt init option Summary You can pass the...
init option
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#init-option
Summary
You can pass the fetch's RequestInit object to the request as the init option. Below is an example of aborting a Request. ```ts import { hc } from 'hono/client' const client = hc ('http://localhost:8787/') const abortController = new...
Content
You can pass the fetch's RequestInit object to the request as the init option. Below is an example of aborting a Request.
import { hc } from 'hono/client'
const client = hc<AppType>('http://localhost:8787/')
const abortController = new AbortController()
const res = await client.api.posts.$post(
{
json: {
// Request body
},
},
{
// RequestInit object
init: {
signal: abortController.signal,
},
}
)
// ...
abortController.abort()::: info
A RequestInit object defined by init takes the highest priority. It could be used to overwrite things set by other options like body | method | headers.
:::