SimApiBase<TId> class abstract

Abstract base class defining the interface for SimApi

Implementers

Constructors

SimApiBase.new()

Properties

currentData Map<String, Map<TId, dynamic>>
Retrieves the current state of the sim api's data
no setter
delay int
Retrieves the current delay setting
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearData() → void
Clears all data from the sim api
delete(Uri url, {Map<String, String>? headers, Object? body}) Future<Response>
Simulates a DELETE request
get(Uri url, {Map<String, String>? headers}) Future<Response>
Simulates a GET request
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch(Uri url, {Map<String, String>? headers, Object? body}) Future<Response>
Simulates a PATCH request
post(Uri url, {Map<String, String>? headers, Object? body}) Future<Response>
Simulates a POST request
put(Uri url, {Map<String, String>? headers, Object? body}) Future<Response>
Simulates a PUT request
registerRoute(String route, {SimApiHttpMethod? method, bool? haveRouteParameters, bool? haveQueryParameters, RouteHandler? handler}) SimApiBase
Registers a route with optional configuration for handling requests.
registerRouteWithMethod(String route, SimApiHttpMethod method) SimApiBase
Registers a route with a specified HTTP method
seedData(String route, Map<TId, dynamic> data) → void
Seeds the sim api with initial data
toString() String
A string representation of this object.
inherited

Operators

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