get method

Future<Response> get(
  1. Uri url, {
  2. List<Header> headers = const [],
  3. Map<String, String> params = const {},
})

Implementation

Future<Response> get(
  Uri url, {
  List<Header> headers = const [],
  Map<String, String> params = const {},
}) async {
  final urlWithParams = url.includeParams(params);
  final rawResponse = await _client.get(
    urlWithParams,
    headers: {
      for (final header in headers) header.name: header.value,
    },
  );

  return Response(rawResponse);
}