什麼時候應該使用post vs get?在WCF上的REST服務中,下面是我的接口WIn上的REST服務的WebInvoke Method =「POST」或「GET」
[OperationContract]
[WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)]
string DoLodge(string Id, Lodge value);
[OperationContract]
[WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)]
LodgeLevel[] GetLodgeLevels(string Id);
[OperationContract]
[WebInvoke(Method = "POST", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)]
long GetLodgeCount(string Id);