企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[TOC] ## response 语法 ``` interface Body { readonly body: ReadableStream<Uint8Array> | null; readonly bodyUsed: boolean; arrayBuffer(): Promise<ArrayBuffer>; blob(): Promise<Blob>; formData(): Promise<FormData>; json(): Promise<any>; // 转换 json text(): Promise<string>; } interface Response extends Body { readonly headers: Headers; readonly ok: boolean; // HTTP CODE 在 200-299 之间,则为true readonly redirected: boolean; readonly status: number; // 状态码 readonly statusText: string; readonly type: ResponseType; readonly url: string; // 请求的url clone(): Response; } declare var Response: { prototype: Response; new(body?: BodyInit | null, init?: ResponseInit): Response; error(): Response; redirect(url: string | URL, status?: number): Response; }; ```