DefaultHttpTransport class
Default HttpTransport backed by package:http.
Sets a JSON content type unless the caller overrides it and applies a bounded default timeout so a stalled connection cannot hang indefinitely.
- Implemented types
Constructors
- DefaultHttpTransport({Duration defaultTimeout = const Duration(seconds: 30)})
Properties
- defaultTimeout → Duration
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post(
{required String url, required String body, required Map< String, String> headers, Duration? timeout}) → Future<HttpResponse> -
Sends a POST request and returns the raw status code and body.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited