StringBufferedResponse class
A buffered HTTP response that stores the output in the given string buffer
rather than the original HttpResponse
instance.
- Inheritance
-
- Object
- StreamConsumerWrapper<
List< int> > - IOSinkWrapper
- HttpResponseWrapper
- AbstractBufferedResponse
- StringBufferedResponse
Constructors
- StringBufferedResponse(HttpResponse? origin, StringBuffer buffer)
Properties
- buffer → StringBuffer
-
The buffer for holding the output (instead of origin)
final
- bufferOutput ↔ bool
-
Gets or sets if the HttpResponse should buffer output.
getter/setter pairinherited
- connectionInfo → HttpConnectionInfo?
-
Gets information about the client connection. Returns
null
if the socket is not available.no setterinherited - contentLength ↔ int
-
Gets and sets the content length of the response. If the size of
the response is not known in advance set the content length to
-1, which is also the default if not set.
getter/setter pairinherited
-
Cookies to set in the client (in the 'set-cookie' header).
no setterinherited
- deadline ↔ Duration?
-
Set and get the deadline for the response. The deadline is timed from the
time it's set. Setting a new deadline will override any previous deadline.
When a deadline is exceeded, the response will be closed and any further
data ignored.
getter/setter pairinherited
- done → Future
-
A future that will complete when the consumer closes, or when an
error occurs.
no setterinherited
- encoding ↔ Encoding
-
The Encoding used when writing strings.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- headers → HttpHeaders
-
Returns the response headers.
no setterinherited
- origin → HttpResponse
-
The original stream consumer
no setterinherited
- persistentConnection ↔ bool
-
Gets and sets the persistent connection state. The initial value
of this property is the persistent connection state from the
request.
getter/setter pairinherited
- reasonPhrase ↔ String
-
The reason phrase for the response.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode ↔ int
-
The status code of the response.
getter/setter pairinherited
Methods
-
add(
List< int> data) → void -
Adds byte
data
to the target consumer, ignoring encoding.override -
addError(
Object error, [StackTrace? stackTrace]) → void -
Passes the error to the target consumer as an error event.
inherited
-
addStream(
Stream< List< stream) → Futureint> > -
Consumes the elements of
stream
.inherited -
close(
) → Future -
Tells the consumer that no further streams will be added.
inherited
-
detachSocket(
{bool writeHeaders = true}) → Future< Socket> -
Detaches the underlying socket from the HTTP server. When the
socket is detached the HTTP server will no longer perform any
operations on it.
inherited
-
flush(
) → Future -
Returns a Future that completes once all buffered data is accepted by the
underlying StreamConsumer.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
redirect(
Uri location, {int status = HttpStatus.movedTemporarily}) → Future -
Respond with a redirect to
location
.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
write(
Object? obj) → void -
Converts
object
to a String by invoking Object.toString and adds the encoding of the result to the target consumer.override -
writeAll(
Iterable objects, [String separator = ""]) → void -
Iterates over the given
objects
and writes them in sequence.inherited -
writeCharCode(
int charCode) → void -
Writes the character of
charCode
.inherited -
writeln(
[Object? obj = ""]) → void -
Converts
object
to a String by invoking Object.toString and writes the result tothis
, followed by a newline.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited