pierresouchay / consul-rust

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

Fix putting extra quotes on kv values. #64

Closed 0xAda closed 2 years ago

0xAda commented 3 years ago

Values stored using the KV API are currently serialized as json when they are already strings, this causes them to be put in quotes(#49). This pr adds 2 new methods to request.rs to send a put request with the body as bytes which is what consul is expecting.

frannoriega commented 2 years ago

+1 to this. Although this PR should also address the get method, which is also expecting a JSON response (instead of bytes).

theirix commented 2 years ago

@0x4da seems you had deleted the repository with the PR itself. And it did the work perfectly. Would you mind if I create a new PR based on your code citing you as the author if you cannot recreate one?

Parsing JSON from the base64 is addressed by other open PRs.