This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new 7443706 docs: update document getting-started.md in en and zh (#4277)
7443706 is described below
commit 744370606e2b8eef75b1d70e080b2d8cc9a572f9
Author: Simon <[email protected]>
AuthorDate: Thu May 20 08:54:06 2021 +0800
docs: update document getting-started.md in en and zh (#4277)
---
docs/en/latest/getting-started.md | 4 ++--
docs/zh/latest/getting-started.md | 13 ++-----------
2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/docs/en/latest/getting-started.md
b/docs/en/latest/getting-started.md
index 53660f6..9679c16 100644
--- a/docs/en/latest/getting-started.md
+++ b/docs/en/latest/getting-started.md
@@ -138,7 +138,7 @@ After this Route is created, we could use Apache APISIX's
address to access our
$ curl -i -X GET "http://{APISIX_BASE_URL}/services/users/getAll?limit=10" -H
"Host: example.com"
```
-This will be forward to `http://httpbin.org:80/getAll?limit=10` by Apache
APISIX.
+This will be forward to `http://httpbin.org:80/services/users/getAll?limit=10`
by Apache APISIX.
### Create an Upstream
@@ -154,7 +154,7 @@ $ curl "http://127.0.0.1:9080/apisix/admin/upstreams/1" -H
"X-API-KEY: edd1c9f03
}'
```
-We use `roundrobin` as our load balancer mechanism, and set `httpbin.org:80`
as our Upstream target(backend server), and its ID is `50`. For more fields,
please refer to [Admin API](./admin-api.md).
+We use `roundrobin` as our load balancer mechanism, and set `httpbin.org:80`
as our Upstream target(backend server), and its ID is `1`. For more fields,
please refer to [Admin API](./admin-api.md).
**NOTE:** `Create an Upstream` is not required actually, because we could use
[Plugin](./architecture-design/plugin.md) to interceptor requests then response
directly, but let's assume we need to set at least one `Upstream` in this guide.
diff --git a/docs/zh/latest/getting-started.md
b/docs/zh/latest/getting-started.md
index 536f838..2153299 100644
--- a/docs/zh/latest/getting-started.md
+++ b/docs/zh/latest/getting-started.md
@@ -134,7 +134,7 @@ Apache APISIX 是如何知道的呢?那是因为我们为 Route 对象配置
$ curl -i -X GET "http://{APISIX_BASE_URL}/services/users/getAll?limit=10" -H
"Host: example.com"
```
-这将会被 Apache APISIX 转发到 `http://httpbin.org:80/getAll?limit=10`。
+这将会被 Apache APISIX 转发到 `http://httpbin.org:80/services/users/getAll?limit=10`。
### 创建一个上游(Upstream)
@@ -150,19 +150,10 @@ $ curl "http://127.0.0.1:9080/apisix/admin/upstreams/1"
-H "X-API-KEY: edd1c9f03
}'
```
-我们使用 `roundrobin` 作为负载均衡机制,并将 `httpbin.org:80` 设置为我们的上游目标(后端服务),其 ID 为
`50`。更多字段信息,请参阅 [Admin API](./admin-api.md)。
+我们使用 `roundrobin` 作为负载均衡机制,并将 `httpbin.org:80` 设置为我们的上游目标(后端服务),其 ID 为
`1`。更多字段信息,请参阅 [Admin API](./admin-api.md)。
**注意:** 创建上游实际上并不是必需的,因为我们可以使用 [插件](./architecture-design/plugin.md)
拦截请求,然后直接响应。但在本指南中,我们假设需要设置至少一个上游。
-```bash
-$ curl "http://127.0.0.1:9080/apisix/admin/routes/1" -H "X-API-KEY:
edd1c9f034335f136f87ad84b625c8f1" -X PUT -d '
-{
- "uri": "/get",
- "host": "httpbin.org",
- "upstream_id": "1"
-}'
-```
-
### 路由与上游绑定
We just created an Upstream(Reference to our backend services), let's bind one
Route with it!