get method

Future<Response> get(
  1. String uri, {
  2. Map<String, String>? headers,
  3. Map<String, String>? queryParams,
  4. bool cacheResult = true,
})

Performs a GET request with optional caching.

  • uri: The URI path to request (appended to baseUrl)
  • headers: Optional HTTP headers for the request
  • queryParams: Optional query parameters to add to the URL
  • cacheResult: Whether to cache the response (default: true)

Returns a Future that completes with the Response.

Implementation

Future<http.Response> get(String uri,
    {Map<String, String>? headers,
    Map<String, String>? queryParams,
    bool cacheResult = true}) async {
  return _handleRequest(
    method: REQUEST_METHODS.GET,
    uri: uri,
    headers: headers,
    queryParams: queryParams,
    cacheResult: cacheResult,
  );
}