EndpointManager class
Provides the methods to execute your app backend services by making http request to your app endpoints.
If your endpoints require an API key, you can set it in two ways either
as the apiKey input parameter of ClientOptions
to the createClient
function or as an input header with the name Authorization
(e.g., Authorization: <your api key>) in specific methods.
Additionally, if your endpoints require a Session token, you can also set it in two ways either calling the AuthManager.setSession method with a valid session object or as an input header with the name Session (e.g., Session: <your session token>) in specific methods.
Constructors
- EndpointManager(Fetcher fetcher)
- Creates an instance of EndpointManager to make http requests to your app endpoints.
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
-
delete(
String path, {Map< String, dynamic> ? queryParams, Map<String, dynamic> ? headers, Object? body, ResolveType resolveType = ResolveType.json}) → FutureApiResponse - Makes a DELETE request to the endpoint path. Optionally, you can provide body, query string parameters or headers in this request.
-
get(
String path, {Map< String, dynamic> ? queryParams, Map<String, dynamic> ? headers, ResolveType resolveType = ResolveType.json}) → FutureApiResponse - Makes a GET request to the endpoint path. Optionally, you can provide query string parameters or headers in this request.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post(
String path, {Map< String, dynamic> ? queryParams, Map<String, dynamic> ? headers, Object? body, ResolveType resolveType = ResolveType.json}) → FutureApiResponse - Makes a POST request to the endpoint path. Optionally, you can provide body, query string parameters or headers in this request.
-
put(
String path, {Map< String, dynamic> ? queryParams, Map<String, dynamic> ? headers, Object? body, ResolveType resolveType = ResolveType.json}) → FutureApiResponse - Makes a PUT request to the endpoint path. Optionally, you can provide body, query string parameters or headers in this request.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited