thangchung / GrpcJsonTranscoder

A filter which allows a RESTful JSON API client to send requests to .NET web server over HTTP and get proxied to a gRPC service
MIT License
121 stars 26 forks source link

Add support for PUT and DELETE requests #8

Closed pyrox18 closed 4 years ago

pyrox18 commented 5 years ago

For PUT requests, the library will parse both the x-grpc-route-data and x-grpc-body-data upstream headers and merges them into a single JSON object to be sent to the appropriate gRPC service. For DELETE requests, the parser for GET requests is used (where only x-grpc-route-data is parsed).

To help test these new features, I've added an UpdateProduct method and a DeleteProduct method in the Product gRPC service. The Ocelot configuration and appsettings in the OcelotGateway sample project have also been updated to recognise these new methods. The methods can be accessed by making a PUT or DELETE request to /products/{id}.

Closes #6.

thangchung commented 4 years ago

I have merged it with the new version. Thank you for your contribution