curl can do POST. you just need to specify data to send with `-d "content goes here"`. Or you can be explicit about the verb with -X<verb>.Altho, the write values to Consul, you need to use PUT, not POST:$ curl -XPUT localhost:8500/v1/kv/test/hello -d "hello world"true$ curl -XGET localhost:8500/v1/kv/test/hello[{"LockIndex":0,"Key":"test/hello","Flags":0,"Value":"aGVsbG8gd29ybGQ=","CreateIndex":4831750,"ModifyIndex":4831761}]$ curl -Ss -XGET localhost:8500/v1/kv/shared/common/test |jq -r '.[].Value' |base64 -dhello world
On Thu, Sep 8, 2016 at 12:48 PM, <mic...@portworx.com> wrote:
I'm trying to evaluate the K/V feature of consul as a replacement for etcd. The doesn't seem to be a tool that will POST values to the KV store like etcdctl. I can post via the web site, but we want do this from a program. My boss want to demonstrate this with curl which, AFAICT, can't do POSTs.Can anyone help me out here?
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
GitHub Issues: https://github.com/hashicorp/consul/issues
IRC: #consul on Freenode
---
You received this message because you are subscribed to the Google Groups "Consul" group.
To unsubscribe from this group and stop receiving emails from it, send an email to consul-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/consul-tool/fe236a9f-d14e-45b6-af48-e53c8c88128e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I'm trying to evaluate the K/V feature of consul as a replacement for etcd. The doesn't seem to be a tool that will POST values to the KV store like etcdctl. I can post via the web site, but we want do this from a program. My boss want to demonstrate this with curl which, AFAICT, can't do POSTs.Can anyone help me out here?
--