Enables tonic servers to handle requests from grpc-web
clients directly,
without the need of an external proxy.
toml
[dependencies]
tonic-web = "<tonic-web-version>"
The easiest way to get started, is to call the function with your tonic service and allow the tonic server to accept HTTP/1.1 requests:
```rust
async fn main() -> Result<(), Box
Server::builder() .accepthttp1(true) .layer(GrpcWebLayer::new()) .addservice(greeter) .serve(addr) .await?;
Ok(()) } ```
See the examples folder for a server and client example.