You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by me...@apache.org on 2020/10/28 14:24:39 UTC

[apisix] branch master updated: doc: fixed some typo and incorrect examples in getting-started.md and syslog.md (#2458)

This is an automated email from the ASF dual-hosted git repository.

membphis 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 e472d2c  doc: fixed some typo and incorrect examples in getting-started.md and syslog.md (#2458)
e472d2c is described below

commit e472d2c2dbf667c0b40a61a24f917048cfdd2b09
Author: dabue <53...@users.noreply.github.com>
AuthorDate: Wed Oct 28 22:24:32 2020 +0800

    doc: fixed some typo and incorrect examples in getting-started.md and syslog.md (#2458)
    
    fix #2457
---
 doc/getting-started.md       |  2 +-
 doc/plugins/syslog.md        | 33 +++++++++++++++------------------
 doc/zh-cn/getting-started.md |  2 +-
 doc/zh-cn/plugins/syslog.md  | 33 +++++++++++++++------------------
 4 files changed, 32 insertions(+), 38 deletions(-)

diff --git a/doc/getting-started.md b/doc/getting-started.md
index 65e1bea..25269ab 100644
--- a/doc/getting-started.md
+++ b/doc/getting-started.md
@@ -237,7 +237,7 @@ curl http://127.0.0.1:9080/apisix/admin/routes/5 -H 'X-API-KEY: edd1c9f034335f13
 Now you can invoke the route with the following command:
 
 ```bash
-curl -i -X GET http://127.0.0.1:9080/samplePrefix/get?param1=foo&param2=bar -H 'apikey: superSecretAPIKey'
+curl -i -X GET 'http://127.0.0.1:9080/samplePrefix/get?param1=foo&param2=bar' -H 'apikey: superSecretAPIKey'
 ```
 
 ## APISIX Dashboard
diff --git a/doc/plugins/syslog.md b/doc/plugins/syslog.md
index 60f0e10..e61d6f9 100644
--- a/doc/plugins/syslog.md
+++ b/doc/plugins/syslog.md
@@ -57,25 +57,22 @@ This will provide the ability to send Log data requests as JSON objects.
 The following is an example on how to enable the sys-logger for a specific route.
 
 ```shell
-curl http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
 {
-    "username": "foo",
     "plugins": {
-          "plugins": {
-                "syslog": {
-                     "host" : "127.0.0.1",
-                     "port" : 5044,
-                     "flush_limit" : 1
-                  }
-           },
-          "upstream": {
-               "type": "roundrobin",
-               "nodes": {
-                   "127.0.0.1:1980": 1
-               }
-          },
-          "uri": "/hello"
-    }
+        "syslog": {
+                "host" : "127.0.0.1",
+                "port" : 5044,
+                "flush_limit" : 1
+            }
+    },
+    "upstream": {
+        "type": "roundrobin",
+        "nodes": {
+            "127.0.0.1:1980": 1
+        }
+    },
+    "uri": "/hello"
 }'
 ```
 
@@ -96,7 +93,7 @@ Remove the corresponding json configuration in the plugin configuration to disab
 APISIX plugins are hot-reloaded, therefore no need to restart APISIX.
 
 ```shell
-$ curl http://127.0.0.1:2379/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d value='
+$ curl http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
 {
     "methods": ["GET"],
     "uri": "/hello",
diff --git a/doc/zh-cn/getting-started.md b/doc/zh-cn/getting-started.md
index 5cbc1d8..0478d88 100644
--- a/doc/zh-cn/getting-started.md
+++ b/doc/zh-cn/getting-started.md
@@ -232,7 +232,7 @@ curl http://127.0.0.1:9080/apisix/admin/routes/5 -H 'X-API-KEY: edd1c9f034335f13
 现在可以使用以下命令调用路由:
 
 ```bash
-curl -i -X GET http://127.0.0.1:9080/samplePrefix/get?param1=foo&param2=bar -H 'apikey: superSecretAPIKey'
+curl -i -X GET 'http://127.0.0.1:9080/samplePrefix/get?param1=foo&param2=bar' -H 'apikey: superSecretAPIKey'
 ```
 
 ## Apache APISIX 控制台
diff --git a/doc/zh-cn/plugins/syslog.md b/doc/zh-cn/plugins/syslog.md
index 11e9d01..e8fe5dd 100644
--- a/doc/zh-cn/plugins/syslog.md
+++ b/doc/zh-cn/plugins/syslog.md
@@ -57,25 +57,22 @@
 1. 下面例子展示了如何为指定路由开启 `sys-logger` 插件的。
 
 ```shell
-curl http://127.0.0.1:9080/apisix/admin/consumers -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
+curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
 {
-    "username": "foo",
     "plugins": {
-          "plugins": {
-              "syslog": {
-                   "host" : "127.0.0.1",
-                   "port" : 5044,
-                   "flush_limit" : 1
-                }
-           },
-          "upstream": {
-               "type": "roundrobin",
-               "nodes": {
-                   "127.0.0.1:1980": 1
-               }
-          },
-          "uri": "/hello"
-    }
+        "syslog": {
+            "host" : "127.0.0.1",
+            "port" : 5044,
+            "flush_limit" : 1
+        }
+    },
+    "upstream": {
+        "type": "roundrobin",
+        "nodes": {
+            "127.0.0.1:1980": 1
+        }
+    },
+    "uri": "/hello"
 }'
 ```
 
@@ -96,7 +93,7 @@ hello, world
 想要禁用“sys-logger”插件,是非常简单的,将对应的插件配置从json配置删除,就会立即生效,不需要重新启动服务:
 
 ```shell
-$ curl http://127.0.0.1:2379/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d value='
+$ curl http://127.0.0.1:9080/apisix/admin/routes/1  -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
 {
     "methods": ["GET"],
     "uri": "/hello",