嗨,我已经开发了一个WebAPI,其中我采取了网址中的一些参数,然后处理它们。我使用的协议是Modbus。它返回一个字节数组,作为回报,我想从中获取一些特定的字符串数据。下面是我的代码 public string GetData(int slaveId, int dataAddress, int registerCount)
//stringSystem.Tex
我正在使用JAVA的C# webapi。API方法返回文件字节数组。我可以用java读取字节数组响应,但当我试图将其转换为文件时,它会将完整的字符串写入文件中。下面是我使用的代码:byte[] content = EntityUtils.toByteArray(response.getEntity());fileToWriteTo = new F
我正在尝试为一个旧的webapi创建一些邮递员测试用例。 我意识到web需要的是HttpRequest主体中的二进制内容,而不是Json消息。我们有一个c#客户端,它在发送请求之前执行此操作: var body = new ByteArrayContent( SerializeToByteArray(info));using (await Client.Post<HttpResponseMessage>( o