简体   繁体   English

WCF REST服务如何接收字节数组而不是流

[英]How can a WCF REST service receive a byte array, not a stream

I am writing a small image/video upload program using WCF REST. 我正在使用WCF REST编写一个小型图像/视频上传程序。 Ideally, I would have my service accepting a stream. 理想情况下,我会让我的服务接受一个流。 But the client side developer told me that it would make his life more complicated and he would only pass me a byte array. 但客户端开发人员告诉我,这将使他的生活更复杂,他只会传递一个字节数组。

I have no idea how to write a REST service that receives a byte array instead of stream. 我不知道如何编写接收字节数组而不是流的REST服务。 All the examples I could find online are using stream. 我在网上找到的所有例子都是使用流。

Please help! 请帮忙!

Don't worry, he can send a byte array and you can receive a stream. 别担心,他可以发送一个字节数组,你可以收到一个流。 HTTP does not care. HTTP并不关心。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM