Skip to content

Make tonic-web layer generic over request/response body #1361

@bouk

Description

@bouk

Feature Request

Right now the tonic_web layer requires that the upstream service returns a http::Response<BoxBody> and it only accepts http::Request<hyper::Body>. It could be made generic over the request/response body so it could be used in more contexts—for example you could implement the tonic-web layer as a reverse proxy.

Motivation

I want to proxy a Python gRPC service with tonic-web. The lack of flexibility means I can't just stick tonic-web in front of a hyper::Client to proxy the upstream.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions