php - python:在拦截器中读取 grpc proto 请求
问题描述
如何使用 Python 在拦截器中读取 grpc proto 请求?
在 PHP 中,我可以阅读$argument
,这是我需要的。
<?php
use Grpc\Interceptor;
class MyInterceptor extends Interceptor
{
public function interceptUnaryUnary($method,
$argument,
$deserialize,
array $metadata = [],
array $options = [],
$continuation)
{
// $argument is what I needto
return parent::interceptUnaryUnary($method, $argument, $deserialize, $metadata, $options, $continuation);
}
}
解决方案
推荐阅读
- laravel - 重复突变体
- excel - PowerShell 使用单独的相应 csv 文件更新工作簿(Excel 文件)中的多个工作表
- electron - 使用快捷键 CTRL + 减号按钮的电子块
- android - Android 放大动画
- python - RPyC:无法保存图像文件
- vue.js - Vue.js:未在 dist 文件夹中获取外部组件 datetimepicker 的 CSS 参考
- r - unlist(lapply(mydata, function(x) {x$getElementText()})) 之后如何保持值的原始格式
- c# - 如何阻止未阻止的 .net 程序集
- reactjs - 初学者 ReactJS
- java - 仅使用 Thymeleaf 为初学者制作一个简单的 Java 应用程序(没有任何与 Sping 相关的内容)