嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元微信扫码支付:2 元
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
Server开放RESTful API接口,供应用程序/移动App/嵌入式qt通过http post调用,实现获取服务端数据,更新服务器数据
using System.ServiceModel;
using System.ServiceModel.Web;
namespace ResetServer
{
[ServiceContract]
public interface IService
{
// 测试接口
[OperationContract]
[WebInvoke(Method = "POST",
UriTemplate = "Test",
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.WrappedRequest)]
string Test();
// 多个参数接口
[OperationContract]
[WebInvoke(Method = "POST",
UriTemplate = "MultiParam",
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.WrappedRequest)]
string MultiParam(string strParam1, string strParam2);
// 查询Sql语句(未加密)
[OperationContract]
[WebInvoke(Method = "POST",
UriTemplate = "GetDataTable",
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.WrappedRequest)]
string GetDataTable(string strSql);
// 查询Sql语句(DES加密)
[OperationContract]
[WebInvoke(Method = "POST",
UriTemplate = "GetDataTable_DES",
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.WrappedRequest)]
string GetDataTable_DES(string strSql);
// 执行Sql语句(未加密)
[OperationContract]
[WebInvoke(Method = "POST",
UriTemplate = "ExecuteNonQuery",
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.WrappedRequest)]
string ExecuteNonQuery(string strSql);
// 执行Sql语句(DES加密)
[OperationContract]
[WebInvoke(Method = "POST",
UriTemplate = "ExecuteNonQuery_DES",
ResponseFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.WrappedRequest)]
string ExecuteNonQuery_DES(string strSql);
}
}