HttpClient class
Wrapper for http requests
Constructors
Properties
Methods
-
get<
T> ({required String path, required T decoder(Response), Map< String, Object> parameters = const {}, Map<String, String> headers = const {}}) → Future<ApiResult< T> > -
Executes HTTP GET request
path
- relative to baseUrl pathdecoder
- function which will be called if http request was successful to converthttp.Response
toT
parameters
- collection of query parametersheaders
- collection of headers which should be applied to this request -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post<
T> ({required String path, required T decoder(Response), Map< String, Object> parameters = const {}, Map<String, String> headers = const {}, required dynamic body}) → Future<ApiResult< T> > -
Executes HTTP POST request
path
- relative to baseUrl pathdecoder
- function which will be called if http request was successful to converthttp.Response
toT
parameters
- collection of query parametersheaders
- collection of headers which should be applied to this requestbody
- http request body which will be encode to JSON -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited