JsonApi class abstract
The JsonApi provides methods for interacting with a RESTful/HTTP API:
- Implementers
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
get(
{required String host, String? path, Map< String, String> ? queryParameters, Map<String, String> ? headers, bool isHttps, Duration timeout}) → Future<JSON> -
Fetches the JSON object from the HTTP endpoint using the
path,queryParametersandheadersfor the RESTful servicehost. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post(
{required String host, String? path, Map< String, String> ? queryParameters, Map<String, String> ? headers, JSON? body, bool isHttps = true}) → Future<JSON?> -
Posts JSON
bodyto the HTTP endpoint using thehost,path,queryParametersandheadersusing HTTPS ifisHttps. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited