Make Client mutable in endpoint_handler