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

Read the Http Post Body #921

Closed
reachlakstar opened this issue Apr 11, 2019 · 1 comment
Closed

Read the Http Post Body #921

reachlakstar opened this issue Apr 11, 2019 · 1 comment

Comments

@reachlakstar
Copy link

Suggest me how to do this.

  1. Rest Gateway : Http handler will read the post body (json)
  2. Call Rest api to send the request body for metrics collection
  3. serve the http request to grpc server.

In short collect the metrics and also send it to grpc server. I am trying to use Ioutil.readall in the second step, after that i am losing request body.

@johanbrandhorst
Copy link
Collaborator

Hi, missed this the first time around, normally you would do metrics in a gRPC interceptor, so it works for both REST and gRPC traffic. Does that answer the question? I'm gonna close this as it's not a gateway issue, but feel free to ask for more help in #grpc-gateway on Gophers slack.

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