From 8cef9dfec8fa9ef5bceb553981ed3ea09090a223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=A5=9A?= <771730766@qq.com> Date: Wed, 15 Apr 2020 22:44:40 +0800 Subject: [PATCH] =?UTF-8?q?Updated=20MediaServer=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E7=9A=84HTTP=20API=20(markdown)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MediaServer支持的HTTP-API.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MediaServer支持的HTTP-API.md b/MediaServer支持的HTTP-API.md index f3d6f4a..4d5da64 100644 --- a/MediaServer支持的HTTP-API.md +++ b/MediaServer支持的HTTP-API.md @@ -42,7 +42,7 @@ MediaServer是ZLMediaKit的主进程,目前支持以下http api接口,这些 "msg" : "失败提示" } ``` -- code值代码执行结果,目前包含以下类型: +- code值代表执行结果,目前包含以下类型: ```c++ typedef enum { Exception = -400,//代码抛异常 @@ -54,7 +54,7 @@ typedef enum { } ApiErr; ``` -- 如果执行成功,一般无msg字段。 +- 如果执行成功,那么 `code == 0`,并且一般无`msg`字段。 - `code == -1`时代表业务代码执行不成功,更细的原因一般提供`result`字段,例如以下: ```json @@ -66,6 +66,7 @@ typedef enum { ``` - 开发者一般只要关注`code`字段和msg字段,如果`code !=0 `时,打印显示`msg`字段即可。 + - `code == 0`时代表完全成功,如果有数据返回,一般提供`data`字段。 ## API详解