refactor WithServer.
added suport for request timeout