Implements the getting of data from the server.