HttpTransport class
The real transport, over package:http.
- Implemented types
Constructors
- HttpTransport({Client? client, Duration connectTimeout = const Duration(seconds: 10), Duration idleTimeout = const Duration(seconds: 60)})
-
Creates a transport, optionally over a supplied
client.
Properties
- connectTimeout → Duration
-
How long to wait for response headers before giving up.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- idleTimeout → Duration
-
How long to wait between two chunks of a streaming body before giving up.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → void -
Releases underlying resources.
override
-
get(
String path, {required String deviceId}) → Future< String> -
Performs a GET and returns the body as text.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post(
String path, Map< String, dynamic> body, {required String deviceId}) → Future<String> -
Performs a POST and returns the body as text.
override
-
stream(
String path, Map< String, dynamic> body, {required String deviceId}) → Future<Stream< List< >int> > -
Opens a streaming POST and yields the raw response bytes.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited