Ecwid / consul-api

Java client for Consul HTTP API
Apache License 2.0
416 stars 177 forks source link

Would it be any interest to be able to make a ConsulClient with a given QueryParams and acl token? #218

Open criverc opened 2 years ago

criverc commented 2 years ago

So that it is not needed to provide them again for every call. i.e. Instead of doing this:

c = new ConsulClient(); c.getCatalogService(someServiceName, someTag, QueryParams.DEFAULT, someACLToken);

do this:

c = new ConsulClient(QueryParams.DEFAULT, someACLToken); c.getCatalogService(someServiceName, someTag);

DanielYWoo commented 2 years ago

Absolutely yes. It will save me a lot of keystrokes.

DanielYWoo commented 2 years ago

I would like to raise a PR if the maintainers want something like this.