Ecwid / consul-api

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

Can you please provide support to pass X-Consul-Token in header #186

Open bdhayakar opened 5 years ago

bdhayakar commented 5 years ago

Hi,

Does the library support passing "X-Consul-Token" in headers. As per consul documentation https://www.consul.io/api/index.html, passing token as query parameter is discouraged. Is there a plan to implement this feature ?

Thanks Dayakar

marcokrikke commented 1 year ago

Seems this library still uses the token query parameter https://github.com/Ecwid/consul-api/blob/232550b44e122f42446876835946baf2de333f53/src/main/java/com/ecwid/consul/v1/kv/KeyValueConsulClient.java#L69

This is deprecated and will be removed in Consul 1.17. From then on, only the X-Consul-Token header or a Bearer token are supported.