awaiting the client response so that it works for all platforms and unit tests