apicloud数据云api restapi操作
2016-03-17 13:07
357 查看
关于数据云API操作,大家同样是要在apicloud主页上建立一个数据库,数据表等等,参考mcm。其实具体的操作文档上都有,我就说一个例子
这是一个添加的例子,我们需要做的就是在html页面上加上一个导入,这样就行了
<script type="text/javascript" src="script/jquery-1.9.1.min.js"></script>
<script type="text/ecmascript" src="script/jquery.sha1.js"></script>
function test4() { var now = Date.now(); var appKey = $.sha1("A6903547912689"+"UZ"+"8C6CB9D1-FD18-6B0A-859C-EA0D1A2F3927"+"UZ"+now)+"."+now $.ajax({ "url" : "https://d.apicloud.com/mcm/api/friend", "method" : "POST", "cache" : false, "headers" : { "X-APICloud-AppId" : "A6903547912689", "X-APICloud-AppKey" : appKey }, "data" : { "userId" : "API Cloud", "friendUserId" : "Branch" } }).success(function(data, status, header) { //success body alert("data="+JSON.stringify(data)); }).fail(function(header, status, errorThrown) { //fail body alert("失败"); }) }
这是一个添加的例子,我们需要做的就是在html页面上加上一个导入,这样就行了
<script type="text/javascript" src="script/jquery-1.9.1.min.js"></script>
<script type="text/ecmascript" src="script/jquery.sha1.js"></script>
相关文章推荐
- 关于类加载线程 和主线程是否是一个线程的疑问
- 设计模式:享元模式
- 美团技术团队也在使用强大的构建系统Gradle
- JSP中setattribute与setParameter的区别
- C++静态库与动态库
- HTML5 - 使用polyfill(腻子脚本)填补旧浏览器对html5的支持缺陷
- infinispan项目中的配置
- git pull VS git fetch&merge(good)
- 经典FormsAuthenticationTicket 分析
- linux 配置ip重启网络失败 出现未知连接
- english
- 结合MapReduce和数据集Combining datasets with MapReduce
- 3 月14日作业
- lesson1
- asp.net学习之Repeater控件
- 网易游戏2016研发实习生招聘在线编程题目 推箱子
- 实现Hadoop的Writable接口Implementing Writable interface of Hadoop
- oracle树形查询语句
- HTML5 - 判断浏览器是否支持html5某个功能(使用modernizr.js)
- 分布式编译工具