/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. :::

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-init-option-2aa26bac0ce2-init-option-s0057-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.