Closed zeyadsalloum closed 5 years ago
hey. check snippet below, hope it'll help.
stub = UserHandlerStub(channel)
request_metadata = {'auth_token': 'some-strongly-hashed-token'}
await stub.UpdateProfile(UpdateProfileRequest(username='benaffleck'), metadata=request_metadata)
Currently there is a lack of examples and documentation about sending and receiving metadata. Going to fix this soon. Here is what we have for now: UnaryUnaryMethod.__call__
@nickpro I think that you have a typo in your example :)
await stub.UpdateProfile(UpdateProfileRequest(username='benaffleck'),
metadata=request_metadata)
@vmagamedov right you, fixed my previous reply, thanks!
@zeyadsalloum documented metadata usage here: https://grpclib.readthedocs.io/en/latest/metadata.html
Is it Ok to close this issue?
yup. Thanks for the updating the docs
is there an example of how the client would send metadata?