InternalResponse class

The InternalResponse class is a wrapper around the HttpResponse class from dart:io.

It is used to create a response object that doesn't expose the HttpResponse object itself.

Inheritance

Constructors

InternalResponse(HttpResponse original, {String? baseUrl})
The InternalResponse constructor is used to create a new instance of the InternalResponse class.

Properties

baseUrl String?
The base url of the server
final
cookies List<Cookie>
The cookies property is used to get the cookies of the response.
no setteroverride
currentHeaders HttpHeaders
This method is used to get the current headers of the response.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
isClosed bool
Determines if the response is closed.
no setteroverride
original HttpResponse
The original T object.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
The statusCode property is used to get the status code of the response.
no setteroverride

Methods

addStream(Stream<List<int>> stream, {bool close = true}) Future<void>
The addStream method is used to send a stream of data to the response.
override
contentType(ContentType contentType, {bool preserveHeaderCase = true}) → void
The contentType method is used to set the content type of the response.
override
detachSocket({bool writeHeaders = false}) Future<Socket>
This method is used to detach the socket from the response.
override
flushAndClose() Future<void>
This method is used to flush all the buffered content and then to close the response stream.
override
The header method is used to set a single header of the response.
override
headers(Map<String, String> headers, {bool preserveHeaderCase = true}) → void
The headers method is used to set the headers of the response.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
redirect(Redirect redirect) Future<void>
This method is used to redirect the response to a new location.
override
send([List<int> data = const []]) → void
The send method send the provided data to the response and closes the response.
override
status(int statusCode) → void
The status method is used to set the status code of the response.
override
toString() String
A string representation of this object.
inherited
write(String data) → void
The write method is used to write data to the response without closing it.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited