pierresouchay / consul-rust

Rust client libray for Consul HTTP API
Apache License 2.0
93 stars 48 forks source link

KV Values should be able to take binary data #30

Open fussybeaver opened 5 years ago

fussybeaver commented 5 years ago

Consul actually supports binary data, as per the documentation https://www.consul.io/api/kv.html#create-update-key

The library should ideally support a Vec<u8> as payload. Unfortunately, with the current API this requires owning a KVPair, which is a bit awkward from a user perspective.

This problem manifests itself when you try to post JSON containing mixed types.

pierresouchay commented 3 years ago

Yes, the API needs refactoring on the KV, fully agree.