diff --git a/docs/en/latest/router-radixtree.md b/docs/en/latest/router-radixtree.md index 197f666fc415..3f5d1efe1c8c 100644 --- a/docs/en/latest/router-radixtree.md +++ b/docs/en/latest/router-radixtree.md @@ -295,23 +295,23 @@ We can verify GraphQL matches in the following two ways: 1. GraphQL query strings - ```shell - $ curl -H 'content-type: application/graphql' -X POST http://127.0.0.1:9080/graphql -d ' - query getRepo { - owner { - name - } - repo { - created - } - }' - ``` +```shell +$ curl -H 'content-type: application/graphql' -X POST http://127.0.0.1:9080/graphql -d ' +query getRepo { + owner { + name + } + repo { + created + } +}' +``` 2. JSON format - ```shell - $ curl -H 'content-type: application/json' -X POST http://127.0.0.1:9080/graphql --data '{"query": "query getRepo { owner {name } repo {created}}"}' - ``` +```shell +$ curl -H 'content-type: application/json' -X POST http://127.0.0.1:9080/graphql --data '{"query": "query getRepo { owner {name } repo {created}}"}' +``` Next, try a GET request. Let's first configure a route like this: diff --git a/docs/zh/latest/router-radixtree.md b/docs/zh/latest/router-radixtree.md index 1bb935ad1c1a..c7b3e3386d6c 100644 --- a/docs/zh/latest/router-radixtree.md +++ b/docs/zh/latest/router-radixtree.md @@ -296,23 +296,23 @@ $ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f 1. 使用 GraphQL 查询字符串 - ```shell - $ curl -H 'content-type: application/graphql' -X POST http://127.0.0.1:9080/graphql -d ' - query getRepo { - owner { - name - } - repo { - created - } - }' - ``` +```shell +$ curl -H 'content-type: application/graphql' -X POST http://127.0.0.1:9080/graphql -d ' +query getRepo { + owner { + name + } + repo { + created + } +}' +``` 2. 使用 JSON 格式 - ```shell - $ curl -H 'content-type: application/json' -X POST http://127.0.0.1:9080/graphql --data '{"query": "query getRepo { owner {name } repo {created}}"}' - ``` +```shell +$ curl -H 'content-type: application/json' -X POST http://127.0.0.1:9080/graphql --data '{"query": "query getRepo { owner {name } repo {created}}"}' +``` 接下来,尝试一下 GET 请求。 我们首先配置这样的路由: