FetchUrlResult
Defined in: packages/tools/src/web/tools.ts:74
fetchUrl’s result. A non-2xx status is a normal outcome here — see
FETCH_URL_DESCRIPTION.
Properties
Section titled “Properties”content
Section titled “content”content:
string
Defined in: packages/tools/src/web/tools.ts:81
The readable content: markdown when the source was HTML, otherwise the decoded text.
contentType
Section titled “contentType”contentType:
string|null
Defined in: packages/tools/src/web/tools.ts:79
The response’s declared Content-Type, or null when it sent none.
markdown
Section titled “markdown”markdown:
boolean
Defined in: packages/tools/src/web/tools.ts:83
true when the source was HTML converted to markdown.
redirects
Section titled “redirects”redirects:
string[]
Defined in: packages/tools/src/web/tools.ts:87
Every URL redirected to, in order. Empty when the request did not redirect.
status
Section titled “status”status:
number
Defined in: packages/tools/src/web/tools.ts:77
truncated
Section titled “truncated”truncated:
boolean
Defined in: packages/tools/src/web/tools.ts:85
true when the body hit the byte cap and the remainder was discarded.
url:
string
Defined in: packages/tools/src/web/tools.ts:76
The URL the content actually came from — differs from the request when it redirected.