Closed n04ln closed 5 years ago
@NoahOrberg This is already possible. The Default<ServiceName>
method takes a Requestor
. It is not a required param but if you pass it it allows you to customize the request. A Requestor
allows you to supply number of Middleware
. The Middleware gives you hooks for modifying the request before it goes out.
Thanks for your reply.
It worked!
Thank you.
Currently, request is set only
Content-Type
header. So, I suggest a solution to set other header. (This solution is inspired by gRPC)define CallOptions class (like following code) in https://github.com/apptreesoftware/twirp_dart_core
call rpc method with
CallOptions
I implemented in https://github.com/NoahOrberg/protoc-gen-twirp_dart/tree/n/hotfix/inner-class. (but,
CallOptions
definition is included auto-generated file, and don't mention this branch name..)