There needs to be a way to inject a context with fake request information so
that this function is callable directly from a test. Similarly, we need to
expose the response headers written to the context to the caller.
This is currently possible in a convoluted way with the use of
encoding.NewInboundCall but we can do better.
Similarly, if I have a mock client (generated with mockgen), there needs to be
a way to tell the mock client to expect specific request headers or return
specific response headers. This too is possible with some convoluted use of
encoding.NewOutboundCall but we can do better.
Now that we put headers, etc. on context, we need to provide a way for users to build fake versions of these. That is, if I have a handler,
There needs to be a way to inject a context with fake request information so that this function is callable directly from a test. Similarly, we need to expose the response headers written to the context to the caller.
This is currently possible in a convoluted way with the use of
encoding.NewInboundCall
but we can do better.Similarly, if I have a mock client (generated with mockgen), there needs to be a way to tell the mock client to expect specific request headers or return specific response headers. This too is possible with some convoluted use of
encoding.NewOutboundCall
but we can do better.