Skip to content

FetchUrlResult

Defined in: web/tools.ts:66

fetchUrl’s result. A non-2xx status is a normal outcome here — see FETCH_URL_DESCRIPTION.

content: string

Defined in: web/tools.ts:73

The readable content: markdown when the source was HTML, otherwise the decoded text.


contentType: string | null

Defined in: web/tools.ts:71

The response’s declared Content-Type, or null when it sent none.


markdown: boolean

Defined in: web/tools.ts:75

true when the source was HTML converted to markdown.


redirects: string[]

Defined in: web/tools.ts:79

Every URL redirected to, in order. Empty when the request did not redirect.


status: number

Defined in: web/tools.ts:69


truncated: boolean

Defined in: web/tools.ts:77

true when the body hit the byte cap and the remainder was discarded.


url: string

Defined in: web/tools.ts:68

The URL the content actually came from — differs from the request when it redirected.