feat: add GrpcMethod extension into request for client (#1275)
* feat: add GrpcMethod extension into request for client * refactor: change GrpcMethod fields into private and expose methods instead * refactor: hide GrpcMethod::new in doc --------- Co-authored-by: Lucio Franco <[email protected]>
This commit is contained in:
co-authored by
Lucio Franco
parent
1547f968b4
commit
7a6b20d8ef
@@ -247,7 +247,15 @@ pub mod server_reflection_client {
|
||||
let path = http::uri::PathAndQuery::from_static(
|
||||
"/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo",
|
||||
);
|
||||
self.inner.streaming(request.into_streaming_request(), path, codec).await
|
||||
let mut req = request.into_streaming_request();
|
||||
req.extensions_mut()
|
||||
.insert(
|
||||
GrpcMethod::new(
|
||||
"grpc.reflection.v1alpha.ServerReflection",
|
||||
"ServerReflectionInfo",
|
||||
),
|
||||
);
|
||||
self.inner.streaming(req, path, codec).await
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user