how do I call a rest server?
Because of the new Proudly Found Elsewhere standard, Drupal doesn't have its own client.

It does however include Guzzle, a well respected library. You can use that to make your REST calls, or of course include and use another library if you wish.

You can get to the Guzzle client in a default Drupal 8 install through the http_client service:

$httpClient = \Drupal::httpClient();


And the docs for Guzzle are here.