优化:WebApi接收方式

This commit is contained in:
若汝棋茗
2021-07-03 00:24:47 +08:00
parent eff41f0b07
commit 607af2556b
3 changed files with 7 additions and 7 deletions

View File

@@ -56,7 +56,8 @@ namespace RRQMSocket.RPC.WebApi
{
if (i == 0)
{
methodInvoker.Parameters[i] = SerializeConvert.XmlDeserializeFromBytes(httpRequest.Body.ToArray(), methodInstance.ParameterTypes[0]);
methodInvoker.Parameters[i] = SerializeConvert.XmlDeserializeFromBytes(
httpRequest.Encoding.GetBytes(httpRequest.BodyString), methodInstance.ParameterTypes[0]);
}
else
{

View File

@@ -192,7 +192,7 @@ namespace RRQMSocket.RPC.WebApi
{
socketClient.OnReceived = this.OnReceived;
}
socketClient.DataHandlingAdapter = new Http.HttpDataHandlingAdapter(this.BufferLength);
socketClient.SetDataHandlingAdapter(new Http.HttpDataHandlingAdapter(this.BufferLength, HttpType.Server));
}
private void OnReceived(SimpleSocketClient socketClient, ByteBlock byteBlock, object obj)

View File

@@ -4,15 +4,14 @@
<ApplicationIcon>RRQM.ico</ApplicationIcon>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>RRQM.pfx</AssemblyOriginatorKeyFile>
<Version>5.0.0</Version>
<Version>5.1.0</Version>
<Company>若汝棋茗</Company>
<Copyright>Copyright © 2021 若汝棋茗</Copyright>
<Description>介绍这是一个扩展于RRQMSocket.RPC的WebApi组件可以通过该组件直接创建WebApi服务解析器让Web端、移动端可以跨语言调用RPC函数。功能支持路由、Get传参、Post传参等。
RRQMSocket.rPC is a WebAPI component that extends RRQMSocket.rPC. You can directly create a WebAPI service parser through this component, so that the Web end and mobile end can call RPC functions across languages.The function supports routing, GET, POST, etc.
更新说明:
5.0发布
优化:接收方式
Demohttps://gitee.com/RRQM_OS/RRQMBox
APIhttps://gitee.com/RRQM_OS/RRQM/wikis/pages </Description>
@@ -66,8 +65,8 @@ APIhttps://gitee.com/RRQM_OS/RRQM/wikis/pages </Description>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="RRQMSocket.Http" Version="5.0.0" />
<PackageReference Include="RRQMSocket.RPC" Version="5.0.2.1" />
<PackageReference Include="RRQMSocket.Http" Version="5.1.0" />
<PackageReference Include="RRQMSocket.RPC" Version="5.1.1.1" />
</ItemGroup>
<ItemGroup>