Skip to content

Documentation


Documentation / @blazetrails/actionpack / ActionController / LiveResponse

Class: LiveResponse ​

Defined in: packages/actionpack/lib/action-controller/metal/live.ts:215

Extends ​

Constructors ​

Constructor ​

protected new LiveResponse(status?, headers?, body?, block?): Response

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:373

Parameters ​

ParameterTypeDefault value
statusstring | number200
headersRecord<string, string>{}
bodyunknown[]
block?(response) => voidundefined

Returns ​

Response

Inherited from ​

Response.constructor

Properties ​

_body ​

_body: any

Defined in: packages/rack/dist/response.d.ts:6

Inherited from ​

Response._body


_buffered ​

_buffered: boolean | null

Defined in: packages/rack/dist/response.d.ts:8

Inherited from ​

Response._buffered


_writer ​

_writer: (chunk) => string | Uint8Array<ArrayBufferLike>

Defined in: packages/rack/dist/response.d.ts:9

Parameters ​

ParameterType
chunkstring | Uint8Array<ArrayBufferLike>

Returns ​

string | Uint8Array<ArrayBufferLike>

Inherited from ​

Response._writer


cacheControl ​

readonly cacheControl: CacheControlHash

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:578

Inherited from ​

Response.cacheControl


defaultCharset ​

defaultCharset: string | null

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:346

Inherited from ​

Response.defaultCharset


defaultHeaders ​

defaultHeaders: Record<string, string> | undefined

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:348

Inherited from ​

Response.defaultHeaders


etag ​

etag: string | undefined

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:564

Inherited from ​

Response.etag


isAccepted ​

isAccepted: boolean

Defined in: packages/rack/dist/response.d.ts:22

Inherited from ​

Response.isAccepted


isBadRequest ​

isBadRequest: boolean

Defined in: packages/rack/dist/response.d.ts:25

Inherited from ​

Response.isBadRequest


isClientError ​

isClientError: boolean

Defined in: packages/rack/dist/response.d.ts:18

Inherited from ​

Response.isClientError


isCreated ​

isCreated: boolean

Defined in: packages/rack/dist/response.d.ts:21

Inherited from ​

Response.isCreated


isDate ​

readonly isDate: boolean

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:566

Inherited from ​

Response.isDate


isEtag ​

readonly isEtag: string | undefined

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:567

Inherited from ​

Response.isEtag


isForbidden ​

isForbidden: boolean

Defined in: packages/rack/dist/response.d.ts:27

Inherited from ​

Response.isForbidden


isInformational ​

isInformational: boolean

Defined in: packages/rack/dist/response.d.ts:15

Inherited from ​

Response.isInformational


isInvalid ​

isInvalid: boolean

Defined in: packages/rack/dist/response.d.ts:14

Inherited from ​

Response.isInvalid


isLastModified ​

readonly isLastModified: boolean

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:565

Inherited from ​

Response.isLastModified


isMethodNotAllowed ​

isMethodNotAllowed: boolean

Defined in: packages/rack/dist/response.d.ts:29

Inherited from ​

Response.isMethodNotAllowed


isMovedPermanently ​

isMovedPermanently: boolean

Defined in: packages/rack/dist/response.d.ts:24

Inherited from ​

Response.isMovedPermanently


isNoContent ​

isNoContent: boolean

Defined in: packages/rack/dist/response.d.ts:23

Inherited from ​

Response.isNoContent


isNotAcceptable ​

isNotAcceptable: boolean

Defined in: packages/rack/dist/response.d.ts:30

Inherited from ​

Response.isNotAcceptable


isNotFound ​

isNotFound: boolean

Defined in: packages/rack/dist/response.d.ts:28

Inherited from ​

Response.isNotFound


isOk ​

isOk: boolean

Defined in: packages/rack/dist/response.d.ts:20

Inherited from ​

Response.isOk


isPreconditionFailed ​

isPreconditionFailed: boolean

Defined in: packages/rack/dist/response.d.ts:32

Inherited from ​

Response.isPreconditionFailed


isRedirect ​

isRedirect: boolean

Defined in: packages/rack/dist/response.d.ts:34

Inherited from ​

Response.isRedirect


isRedirection ​

isRedirection: boolean

Defined in: packages/rack/dist/response.d.ts:17

Inherited from ​

Response.isRedirection


isRequestTimeout ​

isRequestTimeout: boolean

Defined in: packages/rack/dist/response.d.ts:31

Inherited from ​

Response.isRequestTimeout


isServerError ​

isServerError: boolean

Defined in: packages/rack/dist/response.d.ts:19

Inherited from ​

Response.isServerError


isStrongEtag ​

isStrongEtag: () => boolean | undefined

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:571

Returns ​

boolean | undefined

Inherited from ​

Response.isStrongEtag


isSuccessful ​

isSuccessful: boolean

Defined in: packages/rack/dist/response.d.ts:16

Inherited from ​

Response.isSuccessful


isUnauthorized ​

isUnauthorized: boolean

Defined in: packages/rack/dist/response.d.ts:26

Inherited from ​

Response.isUnauthorized


isUnprocessable ​

isUnprocessable: boolean

Defined in: packages/rack/dist/response.d.ts:33

Inherited from ​

Response.isUnprocessable


isWeakEtag ​

isWeakEtag: () => boolean | undefined

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:570

Returns ​

boolean | undefined

Inherited from ​

Response.isWeakEtag


length ​

length: number | null

Defined in: packages/rack/dist/response.d.ts:7

Inherited from ​

Response.length


mediaTypeParams ​

mediaTypeParams: Record<string, string>

Defined in: packages/rack/dist/response.d.ts:40

Inherited from ​

Response.mediaTypeParams


request ​

request: Request | null = null

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:371

Inherited from ​

Response.request


setCookieHeader ​

setCookieHeader: any

Defined in: packages/rack/dist/response.d.ts:46

Inherited from ​

Response.setCookieHeader


stream ​

stream: FileBody | Buffer<{ push: unknown; }> | { toPath: string; }

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:370

Inherited from ​

Response.stream


strongEtag ​

strongEtag: (validators) => void

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:569

Parameters ​

ParameterType
validatorsunknown

Returns ​

void

Inherited from ​

Response.strongEtag


weakEtag ​

weakEtag: (validators) => void

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:568

Parameters ​

ParameterType
validatorsunknown

Returns ​

void

Inherited from ​

Response.weakEtag


defaultCharset ​

static defaultCharset: string | null

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:345

Inherited from ​

Response.defaultCharset


defaultHeaders ​

static defaultHeaders: Record<string, string> | undefined

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:347

Inherited from ​

Response.defaultHeaders


static Header: typeof Headers = Headers

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:343

Inherited from ​

Response.Header


Headers ​

static Headers: typeof Headers

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:342

Inherited from ​

Response.Headers

Accessors ​

_cacheControl ​

Set Signature ​

set _cacheControl(value): void

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:556

Parameters ​
ParameterType
valuestring | undefined
Returns ​

void

Inherited from ​

Response._cacheControl


body ​

Get Signature ​

get body(): string

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:466

Returns ​

string

Inherited from ​

Response.body


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 ​
ParameterType
charsetstring | false | null | undefined
Returns ​

void

Inherited from ​

Response.charset


code ​

Get Signature ​

get code(): string

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:408

Returns ​

string

Inherited from ​

Response.code


committed ​

Get Signature ​

get committed(): boolean

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:507

Returns ​

boolean

Inherited from ​

Response.committed


contentLength ​

Get Signature ​

get contentLength(): number | undefined

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:492

Returns ​

number | undefined

Inherited from ​

Response.contentLength


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 ​
ParameterType
valuestring | MimeType | undefined
Returns ​

void

Inherited from ​

Response.contentType


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 ​

Response.cookies


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 ​
ParameterType
tTime | Date
Returns ​

void

Inherited from ​

Response.date


header ​

Get Signature ​

get header(): Headers

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:668

Returns ​

Headers

Inherited from ​

Response.header


headers ​

Get Signature ​

get headers(): Headers

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:416

Returns ​

Headers

Inherited from ​

Response.headers


isSending ​

Get Signature ​

get isSending(): boolean

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:649

Returns ​

boolean

Inherited from ​

Response.isSending


isSent ​

Get Signature ​

get isSent(): boolean

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:653

Returns ​

boolean

Inherited from ​

Response.isSent


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 ​
ParameterType
tTime | Date | { epochMilliseconds: number; }
Returns ​

void

Inherited from ​

Response.lastModified


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 ​
ParameterType
urlstring
Returns ​

void

Inherited from ​

Response.location


mediaType ​

Get Signature ​

get mediaType(): string | null

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:683

Returns ​

string | null

Inherited from ​

Response.mediaType


message ​

Get Signature ​

get message(): string

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:412

Returns ​

string

Inherited from ​

Response.message


redirectUrl ​

Get Signature ​

get redirectUrl(): string | undefined

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:680

Returns ​

string | undefined

Inherited from ​

Response.redirectUrl


responseCode ​

Get Signature ​

get responseCode(): number

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:674

Returns ​

number

Inherited from ​

Response.responseCode


sendingFile ​

Set Signature ​

set sendingFile(v): void

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:462

Parameters ​
ParameterType
vboolean
Returns ​

void

Inherited from ​

Response.sendingFile


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 ​
ParameterType
statusstring | number
Returns ​

void

Inherited from ​

Response.status


statusMessage ​

Get Signature ​

get statusMessage(): string

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:677

Returns ​

string

Inherited from ​

Response.statusMessage

Methods ​

abort() ​

abort(): unknown

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:622

Returns ​

unknown

Inherited from ​

Response.abort


addHeader() ​

addHeader(key, value): any

Defined in: packages/rack/dist/response.d.ts:36

Parameters ​

ParameterType
keystring
valuestring | null

Returns ​

any

Inherited from ​

Response.addHeader


awaitCommit() ​

awaitCommit(): Promise<void>

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:657

Returns ​

Promise<void>

Inherited from ​

Response.awaitCommit


awaitSent() ​

awaitSent(): Promise<void>

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:664

Returns ​

Promise<void>

Inherited from ​

Response.awaitSent


bodyParts() ​

bodyParts(): unknown[]

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:600

Returns ​

unknown[]

Inherited from ​

Response.bodyParts


cacheBang() ​

cacheBang(duration?, __namedParameters?): void

Defined in: packages/rack/dist/response.d.ts:51

Parameters ​

ParameterType
duration?number
__namedParameters?{ directive?: string; }
__namedParameters.directive?string

Returns ​

void

Inherited from ​

Response.cacheBang


close() ​

close(): unknown

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:502

Returns ​

unknown

Inherited from ​

Response.close


commitBang() ​

commitBang(): void

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:632

Returns ​

void

Inherited from ​

Response.commitBang


deleteCookie() ​

deleteCookie(name, options?): void

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:530

Parameters ​

ParameterType
namestring
optionsPartial<CookieOptions>

Returns ​

void

Inherited from ​

Response.deleteCookie


deleteHeader() ​

deleteHeader(key): string | undefined

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:428

Parameters ​

ParameterType
keystring

Returns ​

string | undefined

Inherited from ​

Response.deleteHeader


doNotCacheBang() ​

doNotCacheBang(): void

Defined in: packages/rack/dist/response.d.ts:50

Returns ​

void

Inherited from ​

Response.doNotCacheBang


each() ​

each(block?): unknown

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:615

Parameters ​

ParameterType
block?(chunk) => unknown

Returns ​

unknown

Inherited from ​

Response.each


filteredLocation() ​

filteredLocation(): string

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:519

Returns ​

string

Inherited from ​

Response.filteredLocation


getHeader() ​

getHeader(key): string | undefined

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:420

Parameters ​

ParameterType
keystring

Returns ​

string | undefined

Inherited from ​

Response.getHeader


hasHeader() ​

hasHeader(key): boolean

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:671

Parameters ​

ParameterType
keystring

Returns ​

boolean

Inherited from ​

Response.hasHeader


isInclude() ​

isInclude(header): boolean

Defined in: packages/rack/dist/response.d.ts:35

Parameters ​

ParameterType
headerstring

Returns ​

boolean

Inherited from ​

Response.isInclude


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 ​

Response.prepareBang


resetBodyBang() ​

resetBodyBang(): Promise<void>

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:611

Returns ​

Promise<void>

Inherited from ​

Response.resetBodyBang


sendFile() ​

sendFile(path): void

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:606

Parameters ​

ParameterType
pathstring

Returns ​

void

Inherited from ​

Response.sendFile


sendingBang() ​

sendingBang(): void

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:638

Returns ​

void

Inherited from ​

Response.sendingBang


sentBang() ​

sentBang(): void

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:644

Returns ​

void

Inherited from ​

Response.sentBang


setBody() ​

setBody(body): Promise<void>

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:480

Parameters ​

ParameterType
bodyunknown

Returns ​

Promise<void>

Inherited from ​

Response.setBody


setHeader() ​

setHeader(key, v): string | null

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:424

Parameters ​

ParameterType
keystring
vstring | null

Returns ​

string | null

Inherited from ​

Response.setHeader


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 ​

Response.toA


write() ​

write(string): unknown

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:498

Parameters ​

ParameterType
stringstring

Returns ​

unknown

Inherited from ​

Response.write


create() ​

static create<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 ​

ParameterTypeDefault value
thistypeof Response & { prototype: T; }undefined
statusnumber200
headersRecord<string, string>{}
bodyunknown[]
__namedParameters{ defaultHeaders?: Record<string, string>; }{}
__namedParameters.defaultHeaders?Record<string, string>undefined

Returns ​

Promise<T>

Inherited from ​

Response.create


mergeDefaultHeaders() ​

static mergeDefaultHeaders(original, defaults): Record<string, string>

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:776

Parameters ​

ParameterType
originalRecord<string, string>
defaultsRecord<string, string> | undefined

Returns ​

Record<string, string>

Inherited from ​

Response.mergeDefaultHeaders


new() ​

static new<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 ​

ParameterTypeDefault value
this{ prototype: T; }undefined
this.prototypeTundefined
statusstring | number200
headersRecord<string, string>{}
bodyunknown[]
block?(response) => voidundefined

Returns ​

Promise<T>

Inherited from ​

Response.new


rackStatusCode() ​

static rackStatusCode(status): number

Defined in: packages/actionpack/lib/action-dispatch/http/response.ts:355

Parameters ​

ParameterType
statusstring | number

Returns ​

number

Inherited from ​

Response.rackStatusCode