Z-Blog主页
Z-Wiki
应用中心
菠萝阁
ZBlogger
Z5加密
跳至内容
Z-Blog Wiki
Z-Blog官方文库
用户工具
登录
站点工具
搜索
工具
显示页面
修订记录
最近更改
媒体管理器
网站地图
登录
>
最近更改
媒体管理器
网站地图
您在这里:
Z-Blog & Z-BlogPHP
»
Z-BlogPHP
»
应用开发指南
»
API
»
通用请求及响应示例
zblogphp:development:api:common-template
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
====== 通用模板 ====== ===== 请求 ===== GET/POST ''https://example.com/api.php'' ==== Headers ==== 以下简称“通用请求头”: ^ 参数 ^ 示例值 ^ 说明 ^ | Content-Type | application/json; charset=utf-8 | 客户端发送的内容类型 | | Accept-Encoding | gzip, deflate | 客户端接受的压缩算法 | | User-Agent | Mozilla/5.0 | - | | Accept-Language | zh-cn | 客户端接受的语言代码 | | Authorization | emhvdXppc2h1fHx8ZWQyZTk2OG... | 鉴权头 | ==== Cookies ==== 以下简称“通用请求 Cookies”: ^ 键 ^ 示例值 ^ 域 ^ 路径 ^ 过期 ^ | addinfo | xxxxxxxxxx | example.com | / | - | | http304ok | 1 | example.com | / | - | | timezone | 8 | example.com | / | - | ==== Body ==== 无 ===== 响应 ===== ==== Headers ==== 以下简称“通用响应头”: ^ 参数 ^ 示例值 ^ 说明 ^ | Content-Type | application/json; charset=utf-8 | 响应内容的类型 | | Content-Encoding | gzip | 响应使用的压缩算法 | | Date | Sun, 23 Feb 2020 07:03:41 GMT | 响应的时间 | ==== Cookies ==== 无 ==== Body ==== 以下简称“通用响应体”。 根据客户端的身份验证以及服务端的状态返回内容。 例如: <code> { "message": "OK", "data": {}, "error": null } </code> data 内容由具体的接口决定,一些常见的范例如下: 如,某个用于添加内容的接口。 用 ''code'' 是否为 ''200'' 表示是否添加成功。 ''message'' 传递相应消息,内容无规定。 其他操作以此类推。 <code> { "message": "OK", "data": null, "error": null } </code> <code> { "message": "删除失败,该资源不存在!", "data": null,, "error": null } </code>
zblogphp/development/api/common-template.1597156534.txt
· 最后更改: 2020/08/11 22:35 由
捷闪站长网
页面工具
显示页面
修订记录
页面重命名
回到顶部