Documentation / @blazetrails/actionpack / ActionController / LiveResponse
Class: LiveResponse
Defined in: packages/actionpack/lib/action-controller/metal/live.ts:215
Extends
Constructors
Constructor
protectednew LiveResponse(status?,headers?,body?,block?):Response
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:373
Parameters
| Parameter | Type | Default value |
|---|---|---|
status | string | number | 200 |
headers | Record<string, string> | {} |
body | unknown | [] |
block? | (response) => void | undefined |
Returns
Response
Inherited from
Properties
_body
_body:
any
Defined in: packages/rack/dist/response.d.ts:6
Inherited from
_buffered
_buffered:
boolean|null
Defined in: packages/rack/dist/response.d.ts:8
Inherited from
_writer
_writer: (
chunk) =>string|Uint8Array<ArrayBufferLike>
Defined in: packages/rack/dist/response.d.ts:9
Parameters
| Parameter | Type |
|---|---|
chunk | string | Uint8Array<ArrayBufferLike> |
Returns
string | Uint8Array<ArrayBufferLike>
Inherited from
cacheControl
readonlycacheControl:CacheControlHash
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:578
Inherited from
defaultCharset
defaultCharset:
string|null
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:346
Inherited from
defaultHeaders
defaultHeaders:
Record<string,string> |undefined
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:348
Inherited from
etag
etag:
string|undefined
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:564
Inherited from
isAccepted
isAccepted:
boolean
Defined in: packages/rack/dist/response.d.ts:22
Inherited from
isBadRequest
isBadRequest:
boolean
Defined in: packages/rack/dist/response.d.ts:25
Inherited from
isClientError
isClientError:
boolean
Defined in: packages/rack/dist/response.d.ts:18
Inherited from
isCreated
isCreated:
boolean
Defined in: packages/rack/dist/response.d.ts:21
Inherited from
isDate
readonlyisDate:boolean
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:566
Inherited from
isEtag
readonlyisEtag:string|undefined
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:567
Inherited from
isForbidden
isForbidden:
boolean
Defined in: packages/rack/dist/response.d.ts:27
Inherited from
isInformational
isInformational:
boolean
Defined in: packages/rack/dist/response.d.ts:15
Inherited from
isInvalid
isInvalid:
boolean
Defined in: packages/rack/dist/response.d.ts:14
Inherited from
isLastModified
readonlyisLastModified:boolean
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:565
Inherited from
isMethodNotAllowed
isMethodNotAllowed:
boolean
Defined in: packages/rack/dist/response.d.ts:29
Inherited from
isMovedPermanently
isMovedPermanently:
boolean
Defined in: packages/rack/dist/response.d.ts:24
Inherited from
isNoContent
isNoContent:
boolean
Defined in: packages/rack/dist/response.d.ts:23
Inherited from
isNotAcceptable
isNotAcceptable:
boolean
Defined in: packages/rack/dist/response.d.ts:30
Inherited from
isNotFound
isNotFound:
boolean
Defined in: packages/rack/dist/response.d.ts:28
Inherited from
isOk
isOk:
boolean
Defined in: packages/rack/dist/response.d.ts:20
Inherited from
isPreconditionFailed
isPreconditionFailed:
boolean
Defined in: packages/rack/dist/response.d.ts:32
Inherited from
isRedirect
isRedirect:
boolean
Defined in: packages/rack/dist/response.d.ts:34
Inherited from
isRedirection
isRedirection:
boolean
Defined in: packages/rack/dist/response.d.ts:17
Inherited from
isRequestTimeout
isRequestTimeout:
boolean
Defined in: packages/rack/dist/response.d.ts:31
Inherited from
isServerError
isServerError:
boolean
Defined in: packages/rack/dist/response.d.ts:19
Inherited from
isStrongEtag
isStrongEtag: () =>
boolean|undefined
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:571
Returns
boolean | undefined
Inherited from
isSuccessful
isSuccessful:
boolean
Defined in: packages/rack/dist/response.d.ts:16
Inherited from
isUnauthorized
isUnauthorized:
boolean
Defined in: packages/rack/dist/response.d.ts:26
Inherited from
isUnprocessable
isUnprocessable:
boolean
Defined in: packages/rack/dist/response.d.ts:33
Inherited from
isWeakEtag
isWeakEtag: () =>
boolean|undefined
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:570
Returns
boolean | undefined
Inherited from
length
length:
number|null
Defined in: packages/rack/dist/response.d.ts:7
Inherited from
mediaTypeParams
mediaTypeParams:
Record<string,string>
Defined in: packages/rack/dist/response.d.ts:40
Inherited from
request
request:
Request|null=null
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:371
Inherited from
setCookieHeader
setCookieHeader:
any
Defined in: packages/rack/dist/response.d.ts:46
Inherited from
stream
stream:
FileBody|Buffer<{push:unknown; }> | {toPath:string; }
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:370
Inherited from
strongEtag
strongEtag: (
validators) =>void
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:569
Parameters
| Parameter | Type |
|---|---|
validators | unknown |
Returns
void
Inherited from
weakEtag
weakEtag: (
validators) =>void
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:568
Parameters
| Parameter | Type |
|---|---|
validators | unknown |
Returns
void
Inherited from
defaultCharset
staticdefaultCharset:string|null
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:345
Inherited from
defaultHeaders
staticdefaultHeaders:Record<string,string> |undefined
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:347
Inherited from
Header
staticHeader: typeofHeaders=Headers
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:343
Inherited from
Headers
staticHeaders: typeofHeaders
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:342
Inherited from
Accessors
_cacheControl
Set Signature
set _cacheControl(
value):void
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:556
Parameters
| Parameter | Type |
|---|---|
value | string | undefined |
Returns
void
Inherited from
body
Get Signature
get body():
string
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:466
Returns
string
Inherited from
charset
Get Signature
get charset():
string|null|undefined
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:447
Returns
string | null | undefined
Set Signature
set charset(
charset):void
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:452
Parameters
| Parameter | Type |
|---|---|
charset | string | false | null | undefined |
Returns
void
Inherited from
code
Get Signature
get code():
string
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:408
Returns
string
Inherited from
committed
Get Signature
get committed():
boolean
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:507
Returns
boolean
Inherited from
contentLength
Get Signature
get contentLength():
number|undefined
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:492
Returns
number | undefined
Inherited from
contentType
Get Signature
get contentType():
string|null|undefined
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:432
Returns
string | null | undefined
Set Signature
set contentType(
value):void
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:436
Parameters
| Parameter | Type |
|---|---|
value | string | MimeType | undefined |
Returns
void
Inherited from
cookies
Get Signature
get cookies():
Record<string,string|null>
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:535
Returns
Record<string, string | null>
Inherited from
date
Get Signature
get date():
Date|undefined
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:871
Returns
Date | undefined
Set Signature
set date(
t):void
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:872
Parameters
| Parameter | Type |
|---|---|
t | Time | Date |
Returns
void
Inherited from
header
Get Signature
get header():
Headers
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:668
Returns
Inherited from
headers
Get Signature
get headers():
Headers
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:416
Returns
Inherited from
isSending
Get Signature
get isSending():
boolean
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:649
Returns
boolean
Inherited from
isSent
Get Signature
get isSent():
boolean
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:653
Returns
boolean
Inherited from
lastModified
Get Signature
get lastModified():
Date|undefined
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:869
Returns
Date | undefined
Set Signature
set lastModified(
t):void
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:870
Parameters
| Parameter | Type |
|---|---|
t | Time | Date | { epochMilliseconds: number; } |
Returns
void
Inherited from
location
Get Signature
get location():
string|undefined
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:511
Returns
string | undefined
Set Signature
set location(
url):void
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:515
Parameters
| Parameter | Type |
|---|---|
url | string |
Returns
void
Inherited from
mediaType
Get Signature
get mediaType():
string|null
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:683
Returns
string | null
Inherited from
message
Get Signature
get message():
string
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:412
Returns
string
Inherited from
redirectUrl
Get Signature
get redirectUrl():
string|undefined
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:680
Returns
string | undefined
Inherited from
responseCode
Get Signature
get responseCode():
number
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:674
Returns
number
Inherited from
sendingFile
Set Signature
set sendingFile(
v):void
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:462
Parameters
| Parameter | Type |
|---|---|
v | boolean |
Returns
void
Inherited from
status
Get Signature
get status():
number
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:401
Returns
number
Set Signature
set status(
status):void
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:404
Parameters
| Parameter | Type |
|---|---|
status | string | number |
Returns
void
Inherited from
statusMessage
Get Signature
get statusMessage():
string
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:677
Returns
string
Inherited from
Methods
abort()
abort():
unknown
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:622
Returns
unknown
Inherited from
addHeader()
addHeader(
key,value):any
Defined in: packages/rack/dist/response.d.ts:36
Parameters
| Parameter | Type |
|---|---|
key | string |
value | string | null |
Returns
any
Inherited from
awaitCommit()
awaitCommit():
Promise<void>
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:657
Returns
Promise<void>
Inherited from
awaitSent()
awaitSent():
Promise<void>
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:664
Returns
Promise<void>
Inherited from
bodyParts()
bodyParts():
unknown[]
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:600
Returns
unknown[]
Inherited from
cacheBang()
cacheBang(
duration?,__namedParameters?):void
Defined in: packages/rack/dist/response.d.ts:51
Parameters
| Parameter | Type |
|---|---|
duration? | number |
__namedParameters? | { directive?: string; } |
__namedParameters.directive? | string |
Returns
void
Inherited from
close()
close():
unknown
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:502
Returns
unknown
Inherited from
commitBang()
commitBang():
void
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:632
Returns
void
Inherited from
deleteCookie()
deleteCookie(
name,options?):void
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:530
Parameters
| Parameter | Type |
|---|---|
name | string |
options | Partial<CookieOptions> |
Returns
void
Inherited from
deleteHeader()
deleteHeader(
key):string|undefined
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:428
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
string | undefined
Inherited from
doNotCacheBang()
doNotCacheBang():
void
Defined in: packages/rack/dist/response.d.ts:50
Returns
void
Inherited from
each()
each(
block?):unknown
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:615
Parameters
| Parameter | Type |
|---|---|
block? | (chunk) => unknown |
Returns
unknown
Inherited from
filteredLocation()
filteredLocation():
string
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:519
Returns
string
Inherited from
getHeader()
getHeader(
key):string|undefined
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:420
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
string | undefined
Inherited from
hasHeader()
hasHeader(
key):boolean
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:671
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
boolean
Inherited from
isInclude()
isInclude(
header):boolean
Defined in: packages/rack/dist/response.d.ts:35
Parameters
| Parameter | Type |
|---|---|
header | string |
Returns
boolean
Inherited from
prepareBang()
prepareBang(): [
number,Record<string,string>,unknown]
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:596
Returns
[number, Record<string, string>, unknown]
Inherited from
resetBodyBang()
resetBodyBang():
Promise<void>
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:611
Returns
Promise<void>
Inherited from
sendFile()
sendFile(
path):void
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:606
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
void
Inherited from
sendingBang()
sendingBang():
void
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:638
Returns
void
Inherited from
sentBang()
sentBang():
void
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:644
Returns
void
Inherited from
setBody()
setBody(
body):Promise<void>
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:480
Parameters
| Parameter | Type |
|---|---|
body | unknown |
Returns
Promise<void>
Inherited from
setHeader()
setHeader(
key,v):string|null
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:424
Parameters
| Parameter | Type |
|---|---|
key | string |
v | string | null |
Returns
string | null
Inherited from
toA()
toA(): [
number,Record<string,string>,unknown]
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:591
Returns
[number, Record<string, string>, unknown]
Missing Rails Name
status — PERMANENT
Inherited from
write()
write(
string):unknown
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:498
Parameters
| Parameter | Type |
|---|---|
string | string |
Returns
unknown
Inherited from
create()
staticcreate<T>(this,status?,headers?,body?,__namedParameters?):Promise<T>
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:784
Type Parameters
| Type Parameter |
|---|
T extends Response |
Parameters
| Parameter | Type | Default value |
|---|---|---|
this | typeof Response & { prototype: T; } | undefined |
status | number | 200 |
headers | Record<string, string> | {} |
body | unknown | [] |
__namedParameters | { defaultHeaders?: Record<string, string>; } | {} |
__namedParameters.defaultHeaders? | Record<string, string> | undefined |
Returns
Promise<T>
Inherited from
mergeDefaultHeaders()
staticmergeDefaultHeaders(original,defaults):Record<string,string>
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:776
Parameters
| Parameter | Type |
|---|---|
original | Record<string, string> |
defaults | Record<string, string> | undefined |
Returns
Record<string, string>
Inherited from
new()
staticnew<T>(this,status?,headers?,body?,block?):Promise<T>
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:385
Type Parameters
| Type Parameter |
|---|
T extends Response |
Parameters
| Parameter | Type | Default value |
|---|---|---|
this | { prototype: T; } | undefined |
this.prototype | T | undefined |
status | string | number | 200 |
headers | Record<string, string> | {} |
body | unknown | [] |
block? | (response) => void | undefined |
Returns
Promise<T>
Inherited from
rackStatusCode()
staticrackStatusCode(status):number
Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:355
Parameters
| Parameter | Type |
|---|---|
status | string | number |
Returns
number