POST to WCF from Fiddler succeeds but passes null values

前端 未结 2 514
栀梦
栀梦 2021-01-03 09:52

I\'ve followed this video series on WCF and have the demo working. It involves building a WCF service that manages student evaluation forms, and implements CRUD operations

2条回答
  •  耶瑟儿~
    2021-01-03 10:23

    For POST you need to use BodyStyle = WebMessageBodyStyle.Bare NOT
    WebMessageBodyStyle.Wrapped

        [OperationContract]
        [WebInvoke(RequestFormat = WebMessageFormat.Json,ResponseFormat = WebMessageFormat.Json,UriTemplate = "eval",BodyStyle = WebMessageBodyStyle.Bare)]
        void SubmitEval(Eval eval);
    

提交回复
热议问题