protected function getResponse($host, $query)
  {
      // Build the url.
      $url = $host.'?'.http_build_query($query);

      // Open connection.
      $ch = curl_init();

      // Configure the connection.
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_HEADER, 0);
      curl_setopt($ch, CURLOPT_USERAGENT, Constants::WHATSAPP_USER_AGENT);
      curl_setopt($ch, CURLOPT_HTTPHEADER, ['Accept: text/json']);
      // This makes CURL accept any peer!
      curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

      // Get the response.
      $response = curl_exec($ch);

      // Close the connection.
      curl_close($ch);

      return json_decode($response);
  }