get method

Future<Map<String, dynamic>> get(
  1. String endpoint, {
  2. bool requiresAuth = true,
  3. Map<String, String>? headers,
  4. Map<String, String>? queryParams,
})

Makes a GET request to the specified endpoint.

If requiresAuth is true, authentication will be included in the request. Additional headers and queryParams can be provided. If a response is received, the body is parsed as JSON and returned.

Implementation

Future<Map<String, dynamic>> get(
  String endpoint, {
  bool requiresAuth = true,
  Map<String, String>? headers,
  Map<String, String>? queryParams,
}) async {
  return _makeRequest(
    method: 'GET',
    endpoint: endpoint,
    requiresAuth: requiresAuth,
    headers: headers,
    queryParams: queryParams,
  );
}