From 8837719a8dfa45977bb0c46a863adcbf90c62544 Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Tue, 20 Jun 2017 10:06:02 -0700 Subject: [PATCH] dev-guide: add authentication example for grpc/json --- Documentation/dev-guide/api_grpc_gateway.md | 57 +++++++++++++++++++-- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/Documentation/dev-guide/api_grpc_gateway.md b/Documentation/dev-guide/api_grpc_gateway.md index 3e99f1f4e58..c8cec937d59 100644 --- a/Documentation/dev-guide/api_grpc_gateway.md +++ b/Documentation/dev-guide/api_grpc_gateway.md @@ -6,9 +6,11 @@ etcd v3 uses [gRPC][grpc] for its messaging protocol. The etcd project includes ## Using grpc-gateway -The gateway accepts a [JSON mapping][json-mapping] for etcd's [protocol buffer][api-ref] message definitions. Note that `key` and `value` fields are defined as byte arrays and therefore must be base64 encoded in JSON. +The gateway accepts a [JSON mapping][json-mapping] for etcd's [protocol buffer][api-ref] message definitions. Note that `key` and `value` fields are defined as byte arrays and therefore must be base64 encoded in JSON. The following examples use `curl`, but any HTTP/JSON client should work all the same. -Use `curl` to put and get a key: +### Put and get keys + +Use the `v3alpha/kv/range` and `v3alpha/kv/put` services to read and write keys: ```bash <