Add support for gRPC-web by anuraaga · Pull Request #161 · connectrpc/connect-python

address: str,
*,
proto_json: bool = False,
grpc: bool = False,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had knowingly taken the easy way out on this parameter instead of defining a new type hoping grpc-web isn't needed but alas - I think the breaking change should be small / uncommon enough to go with it

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems fine; should we cut a v0.9.0 in the next few days with this called out? been a little while since the last release.

self, response: Response | SyncResponse, e: ConnectError | None = None
) -> None:
trailers = response.trailers
# Go ahead and feed HTTP trailers regardless of gRPC semantics.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had decided this not because of any conformance test but it seemed reasonable to allow a user to differentiate between response headers and trailers. gRPC wasn't affected by it but it seems gRPC-web conformance tests verify that response.headers are presented to the user as trailers for a trailers-only response