You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/13 03:40:10 UTC
[GitHub] [apisix] idbeta opened a new issue #2735: request help: how to use batch-requests plugin
idbeta opened a new issue #2735:
URL: https://github.com/apache/apisix/issues/2735
### Issue description
I want to try batch-requests, but when I testing it according to the method in the [document](https://github.com/apache/apisix/blob/master/doc/plugins/batch-requests.md), always returned an error, it is different from the result in the document. Is there a mistake in my operation? @ShiningRush
### Environment
* apisix version (cmd: `apisix version`): master
* OS: macos
```shell
curl --location --request POST 'http://127.0.0.1:9080/apisix/batch-requests' \
--header 'Content-Type: application/json' \
--data '{
"headers": {
"Content-Type": "application/json",
"admin-jwt":"xxxx"
},
"timeout": 500,
"pipeline": [
{
"method": "POST",
"path": "/community.GiftSrv/GetGifts",
"body": "test"
},
{
"method": "POST",
"path": "/community.GiftSrv/GetGifts",
"body": "test2"
}
]
}'
```
return
```shell
[
{
"body":"{"error_msg":"404 Route Not Found"}
",
"reason":"Not Found",
"status":404,
"headers":{
"Connection":"keep-alive",
"Content-Type":"text/plain; charset=utf-8",
"Date":"Fri, 13 Nov 2020 03:38:34 GMT",
"Server":"APISIX/2.0",
"Transfer-Encoding":"chunked"
}
},
{
"body":"{"error_msg":"404 Route Not Found"}
",
"reason":"Not Found",
"status":404,
"headers":{
"Connection":"keep-alive",
"Content-Type":"text/plain; charset=utf-8",
"Date":"Fri, 13 Nov 2020 03:38:34 GMT",
"Server":"APISIX/2.0",
"Transfer-Encoding":"chunked"
}
}
]
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] ShiningRush commented on issue #2735: request help: how to use batch-requests plugin
Posted by GitBox <gi...@apache.org>.
ShiningRush commented on issue #2735:
URL: https://github.com/apache/apisix/issues/2735#issuecomment-766887743
> "path": "/community.GiftSrv/GetGifts",
Hmmm, this route is not default,it would be better to change it to a default route.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] ShiningRush commented on issue #2735: request help: how to use batch-requests plugin
Posted by GitBox <gi...@apache.org>.
ShiningRush commented on issue #2735:
URL: https://github.com/apache/apisix/issues/2735#issuecomment-766887743
> "path": "/community.GiftSrv/GetGifts",
Hmmm, this route is not default,it would be better to change it to a default route.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] idbeta commented on issue #2735: request help: how to use batch-requests plugin
Posted by GitBox <gi...@apache.org>.
idbeta commented on issue #2735:
URL: https://github.com/apache/apisix/issues/2735#issuecomment-767309423
I know how to use this plugin, thanks. I think you should add some description in the doc, like "a route should be created first, then use the `batch-requests` plugin to access this route for requests".
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] moonming commented on issue #2735: request help: how to use batch-requests plugin
Posted by GitBox <gi...@apache.org>.
moonming commented on issue #2735:
URL: https://github.com/apache/apisix/issues/2735#issuecomment-766883595
ping @idbeta
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] idbeta commented on issue #2735: request help: how to use batch-requests plugin
Posted by GitBox <gi...@apache.org>.
idbeta commented on issue #2735:
URL: https://github.com/apache/apisix/issues/2735#issuecomment-767252645
> > "path": "/community.GiftSrv/GetGifts",
>
> Hmmm, this route is not default,it would be better to change it to a default route.
ok, I will give it a try.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] idbeta closed issue #2735: request help: how to use batch-requests plugin
Posted by GitBox <gi...@apache.org>.
idbeta closed issue #2735:
URL: https://github.com/apache/apisix/issues/2735
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] idbeta edited a comment on issue #2735: request help: how to use batch-requests plugin
Posted by GitBox <gi...@apache.org>.
idbeta edited a comment on issue #2735:
URL: https://github.com/apache/apisix/issues/2735#issuecomment-767309423
I know how to use this plugin, thanks. I think you should add some description in the doc, like "a route should be created first, then use the `batch-requests` plugin to access this route for requests". @ShiningRush
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] moonming commented on issue #2735: request help: how to use batch-requests plugin
Posted by GitBox <gi...@apache.org>.
moonming commented on issue #2735:
URL: https://github.com/apache/apisix/issues/2735#issuecomment-766883595
ping @idbeta
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] idbeta commented on issue #2735: request help: how to use batch-requests plugin
Posted by GitBox <gi...@apache.org>.
idbeta commented on issue #2735:
URL: https://github.com/apache/apisix/issues/2735#issuecomment-767252645
> > "path": "/community.GiftSrv/GetGifts",
>
> Hmmm, this route is not default,it would be better to change it to a default route.
ok, I will give it a try.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org