Added code to send request to server and back to client