api

接口名称:

  • response.html
    描述:返回一个html格式数据

    URL:http://afnetworking.sinaapp.com/response.html

    结果:<h1>AFNetworking test!</h1>
  • response.xml
    描述:返回一个xml格式数据

    URL:http://afnetworking.sinaapp.com/response.xml

    结果:<?xml version="1.0" encoding="UTF-8"?><doc><person id="1" sex="m"><name>zhangsan</name><age>32</age><adds><add code="home">home add</add><add code="com">com add</add></adds></person><person id="2" sex="w"><name>lisi</name><age>22</age><adds><add ID="22" id="23" code="home">home add</add><add ID="23" id="22" code="com">com add</add><add id="24" code="com">com add</add></adds></person></doc>
  • response.json
    描述:返回一个json的数据

    URLhttp://afnetworking.sinaapp.com/response.json

    结果:{"data": "This is a json data.", "success": true}
  • request_get.json
    描述:使用GET方式请求

    URL:http://afnetworking.sinaapp.com/request_get.json

    参数:"foo=bar"

    结果:
        Success:{"data": {"foo": "bar"}, "success": true}
        Error:{"errors": "Parameter error!", "success": false}
  • request_post_body_http.json
    描述:使用POST方式请求,参数用HTTP序列化

    URL:http://afnetworking.sinaapp.com/requset_post.json

    参数:"foo=bar"

    结果:
        Success:{"data": {"foo": "bar"}, "success": true}
        Error:{"errors": "Parameter error!", "success": false}
  • request_post_body_json.json
    描述:使用POST方式请求,参数用JSON序列化

    URL:http://afnetworking.sinaapp.com/requset_post.json

    参数:"foo:bar"

    结果:
        Success:{"data": {"foo": "bar"}, "success": true}
        Error:{"errors": "Parameter error!", "success": false}
  • upload2server.json
    描述:上传文件到服务器

    URLhttp://afnetworking.sinaapp.com/requset_post.json

    参数:file:image fileName:customName

    结果:
        Success:{"data": ["name":customName, "url":URLByServer], "success": true}
        Error:{"errors": "The file save failed!", "success": false}
  • persons.json
    描述:请求人员信息列表

    URL:http://afnetworking.sinaapp.com/persons.json

    METHOD:POST

    参数:"person_type=student|teacher"

    结果:
        Success:{"data":[{"stu_id":"1234", "name":"zhangsan", "age":"34"},{"stu_id":"5678", "name":"lisi", "age":"28"}], "success": true}
        Error:{"errors": "Please use the POST method!", "success": false}
               {"errors": "Parameter error!", "success": false}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Chrome API是一组由Google提供的应用程序接口,用于与Chrome浏览器进行交互和控制。通过Chrome API,开发者可以创建扩展程序或应用程序,以实现对浏览器的功能扩展和定制化。 Chrome API提供了丰富的功能和能力,包括但不限于以下几个方面: 1. 浏览器操作:可以通过Chrome API来控制浏览器的各种行为,例如打开新标签页、关闭标签页、刷新页面、获取当前标签页信息等。 2. 标签页管理:可以通过Chrome API来管理浏览器中的标签页,例如创建新标签页、切换标签页、获取标签页信息、发送消息给标签页等。 3. 网络请求:可以通过Chrome API来发送HTTP请求,获取网页内容或与服务器进行交互。还可以拦截和修改网络请求,实现自定义的网络请求处理逻辑。 4. 存储和同步:可以使用Chrome API来读写浏览器的本地存储,包括LocalStorage和IndexedDB。还可以使用Chrome同步服务将数据同步到用户的其他设备上。 5. 通知和提醒:可以使用Chrome API来创建桌面通知和提醒,向用户展示重要信息或提醒用户进行某些操作。 6. 权限管理:可以使用Chrome API来管理扩展程序或应用程序的权限,限制其对浏览器和用户数据的访问范围,提高安全性。 以上只是Chrome API的一部分功能,具体的使用方法和详细的API文档可以参考Google Chrome开发者文档。如果你有具体的问题或需要了解某个具体功能的实现方式,可以告诉我,我会尽力帮助你。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值