makeGet<T extends BaseHttpResponse> method
Future<HttpResult<T> >
makeGet<T extends BaseHttpResponse>(
- String path, {
- required T convertBodyFunc(
- Response
- Map<
String, String> ? headers, - Map<
String, String?> ? queryParameters, - String? bearerToken,
- String? clientId,
override
The purpose of this method is to make an HTTP /GET request.
@param path is needed to get the resources
@param convertBodyFunc has a Response as parameter to convert the information into the generic type
@param headers extra other the authentication or client_id
@param queryParameters will be added at the end of the URL
@param bearerToken is used to access to the authenticated resources
@param clientId is used to identify which application is making the requests
@return HttpResult, which contains the error or the result of the operation
Implementation
@override
Future<HttpResult<T>> makeGet<T extends BaseHttpResponse>(
String path, {
required T Function(http.Response) convertBodyFunc,
Map<String, String>? headers,
Map<String, String?>? queryParameters,
String? bearerToken,
String? clientId,
}) {
return _makeRequest(
method: HttpMethod.get,
path: path,
convertFunc: convertBodyFunc,
headers: headers,
queryParameters: queryParameters,
bearerToken: bearerToken,
clientId: clientId,
);
}