consul-rust
consul-rust copied to clipboard
KV put stores value with quotes
Allows to put unmodified data to Consul KV. Currently written value is always quoted.
Closes #49
Hello @theirix,
This is a very nice change (and it should have been done that way from scratch).
This is also unfortunately a breaking change for people relying on the old behavior for put
.
So, I would just change this PR to add a new method (and mark the old one as deprecated) and keep put with existing behavior and marking it as deprecated.
Other possible change, we increase the version number semantically and explain in changelog this is a breaking change.
Regards
Hello, @pierresouchay . Thank you for reviewing the PR. You are right, original KV::put
should be kept for compatibility. I have added a new KV::put_raw
for updated behaviour. Original KV::put
can be used as a public API and in other modules like catalog
where JSON serialization is needed (so no need in deprecation).
Hi Pierre, Could this improvement be merged? It's backwards compatible, so we don't even need to break semantic versioning.