How to send GET request in Drupal 8

In Drupal 8 get request can be sent using Guzzle HTTP Library in following way.

$client = \Drupal::httpClient();
//Sending parameters q and key in GET request.
$request = $client->get('http://api.example.com/resource/1?q=5&key=42b7b2n4wdfd');
$response = $request->getBody(); //You would like JSON decode the response.