Workery / responses / JSONResponse
Class: JSONResponse
responses.JSONResponse
Hierarchy
Response
↳
JSONResponse
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new JSONResponse(body
, init?
): JSONResponse
Parameters
Name | Type |
---|---|
body | any |
init? | ResponseInit |
Returns
Overrides
Response.constructor
Defined in
Properties
webSocket
• Readonly
webSocket: null
| WebSocket
Inherited from
Response.webSocket
Defined in
node_modules/@cloudflare/workers-types/index.d.ts:1547
cf
• Optional
Readonly
cf: any
Inherited from
Response.cf
Defined in
node_modules/@cloudflare/workers-types/index.d.ts:1548
body
• Readonly
body: null
| ReadableStream
<Uint8Array
>
Inherited from
Response.body
Defined in
node_modules/typescript/lib/lib.dom.d.ts:3151
node_modules/@cloudflare/workers-types/index.d.ts:1501
bodyUsed
• Readonly
bodyUsed: boolean
Inherited from
Response.bodyUsed
Defined in
node_modules/typescript/lib/lib.dom.d.ts:3153
node_modules/@cloudflare/workers-types/index.d.ts:1503
headers
• Readonly
headers: Headers
Inherited from
Response.headers
Defined in
node_modules/typescript/lib/lib.dom.d.ts:18936
node_modules/@cloudflare/workers-types/index.d.ts:1540
ok
• Readonly
ok: boolean
Inherited from
Response.ok
Defined in
node_modules/typescript/lib/lib.dom.d.ts:18938
node_modules/@cloudflare/workers-types/index.d.ts:1542
redirected
• Readonly
redirected: boolean
Inherited from
Response.redirected
Defined in
node_modules/typescript/lib/lib.dom.d.ts:18940
node_modules/@cloudflare/workers-types/index.d.ts:1544
status
• Readonly
status: number
Inherited from
Response.status
Defined in
node_modules/typescript/lib/lib.dom.d.ts:18942
node_modules/@cloudflare/workers-types/index.d.ts:1536
statusText
• Readonly
statusText: string
Inherited from
Response.statusText
Defined in
node_modules/typescript/lib/lib.dom.d.ts:18944
node_modules/@cloudflare/workers-types/index.d.ts:1538
type
• Readonly
type: ResponseType
Inherited from
Response.type
Defined in
node_modules/typescript/lib/lib.dom.d.ts:18946
url
• Readonly
url: string
Inherited from
Response.url
Defined in
node_modules/typescript/lib/lib.dom.d.ts:18948
node_modules/@cloudflare/workers-types/index.d.ts:1546
Methods
bytes
▸ bytes(): Promise
<Uint8Array
>
Returns
Promise
<Uint8Array
>
Inherited from
Response.bytes
Defined in
node_modules/@cloudflare/workers-types/index.d.ts:1506
arrayBuffer
▸ arrayBuffer(): Promise
<ArrayBuffer
>
Returns
Promise
<ArrayBuffer
>
Inherited from
Response.arrayBuffer
Defined in
node_modules/typescript/lib/lib.dom.d.ts:3155
▸ arrayBuffer(): Promise
<ArrayBuffer
>
Returns
Promise
<ArrayBuffer
>
Inherited from
Response.arrayBuffer
Defined in
node_modules/@cloudflare/workers-types/index.d.ts:1505
blob
▸ blob(): Promise
<Blob
>
Returns
Promise
<Blob
>
Inherited from
Response.blob
Defined in
node_modules/typescript/lib/lib.dom.d.ts:3157
▸ blob(): Promise
<Blob
>
Returns
Promise
<Blob
>
Inherited from
Response.blob
Defined in
node_modules/@cloudflare/workers-types/index.d.ts:1514
formData
▸ formData(): Promise
<FormData
>
Returns
Promise
<FormData
>
Inherited from
Response.formData
Defined in
node_modules/typescript/lib/lib.dom.d.ts:3159
▸ formData(): Promise
<FormData
>
Returns
Promise
<FormData
>
Inherited from
Response.formData
Defined in
node_modules/@cloudflare/workers-types/index.d.ts:1512
json
▸ json(): Promise
<any
>
Returns
Promise
<any
>
Inherited from
Response.json
Defined in
node_modules/typescript/lib/lib.dom.d.ts:3161
▸ json<T
>(): Promise
<T
>
Type parameters
Name |
---|
T |
Returns
Promise
<T
>
Inherited from
Response.json
Defined in
node_modules/@cloudflare/workers-types/index.d.ts:1510
text
▸ text(): Promise
<string
>
Returns
Promise
<string
>
Inherited from
Response.text
Defined in
node_modules/typescript/lib/lib.dom.d.ts:3163
▸ text(): Promise
<string
>
Returns
Promise
<string
>
Inherited from
Response.text
Defined in
node_modules/@cloudflare/workers-types/index.d.ts:1508
clone
▸ clone(): Response
Returns
Response
Inherited from
Response.clone
Defined in
node_modules/typescript/lib/lib.dom.d.ts:18950
▸ clone(): Response
Returns
Response
Inherited from
Response.clone
Defined in
node_modules/@cloudflare/workers-types/index.d.ts:1534
error
▸ error(): Response
Returns
Response
Inherited from
Response.error
Defined in
node_modules/typescript/lib/lib.dom.d.ts:18957
json
▸ json(data
, init?
): Response
Parameters
Name | Type |
---|---|
data | any |
init? | ResponseInit |
Returns
Response
Inherited from
Response.json
Defined in
node_modules/typescript/lib/lib.dom.d.ts:18959
redirect
▸ redirect(url
, status?
): Response
Parameters
Name | Type |
---|---|
url | string | URL |
status? | number |
Returns
Response
Inherited from
Response.redirect
Defined in
node_modules/typescript/lib/lib.dom.d.ts:18961