[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request help: How to get right body from grpc? #121

Open
BERZERKCOOLeST opened this issue Dec 13, 2022 · 2 comments
Open

request help: How to get right body from grpc? #121

BERZERKCOOLeST opened this issue Dec 13, 2022 · 2 comments

Comments

@BERZERKCOOLeST
Copy link

Issue description

r.Body() gets right body from http request, but gets strange body which seems to be interceptive, when request is from grpc.
Need to get the payload from grpc request to do something. Does it support?

  • APISIX Go Plugin Runner's version: 4.0
  • APISIX version: 2.13.2
  • Go version: 1.18
@An-DJ
Copy link
Contributor
An-DJ commented Jan 6, 2023

@BERZERKCOOLeST Could you plz give the steps to reproduce the problem you met?

@BERZERKCOOLeST
Copy link
Author

@BERZERKCOOLeST Could you plz give the steps to reproduce the problem you met?

  1. Set a route in APISIX dashboard. Set a upstream for the route and the scheme of upstream is grpc(need to implement a simple grpc service as upstream). And set plugin for it;
  2. Send a request with payload using a grpc cli. Try to use r.Body() in plugin to get the payload, but failed, it got a messy payload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants