get method Null safety

Future<Response> get(
  1. {Map<String, dynamic>? headers}
)

Returns a Response object with the response from the server.

If the request fails, the Response object will have a null Response.body and a non-null Response.statusCode. Example:

Response response = await "https://www.google.com".get();

Implementation

Future<Response> get({Map<String, dynamic>? headers}) async {
  return await RequestHandler(this, headers: headers).get();
}