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
-
- Object
- OutgoingMessage<
HttpResponse, HttpHeaders> - InternalResponse
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
-
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
Tobject.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< stream, {bool close = true}) → Future<int> >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
-
header(
String key, String value, {bool preserveHeaderCase = true}) → void -
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
datato 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