简体   繁体   English

REST API不返回任何响应

[英]REST API returning no response

I created a new REST API which is a PUT method. 我创建了一个新的REST API,它是一种PUT方法。

[OperationContract]
[WebInvoke(UriTemplate = "/Place/Info", Method = "PUT", 
             BodyStyle = WebMessageBodyStyle.Bare)]
Info SavePlaceInfo(Info inf);

I'm passing {} I'm expecting some error but getting 0 response. 我正在传递{}但我期望出现一些错误,但响应为0。

What could be the reason. 可能是什么原因。

I'm able to resolve the issue. 我可以解决问题。 The issue was: Json serializer cannot serialize .Net DateTime.MinValue as its kind is of unsepecified. 问题是:Json序列化程序无法序列化.Net DateTime.MinValue,因为它的类型未明确。

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

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