Access Request Body in a WCF RESTful Service

前端 未结 7 1001
不思量自难忘°
不思量自难忘° 2020-12-31 03:14

How do I access the HTTP POST request body in a WCF REST service?

Here is the service definition:

[ServiceContract]
public interface ITestService
{
          


        
7条回答
  •  被撕碎了的回忆
    2020-12-31 03:34

    Best way i think doesn't involve WebOperationContext

    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "EntryPoint", BodyStyle = WebMessageBodyStyle.Bare)]
    MyData GetData(System.IO.Stream pStream);
    

提交回复
热议问题