Adjusted the code for client creation. While you could pass a string for the endpoint, it returned object read-only. Passing in an endpoint object got me a little closer.