Просмотр исходного кода

add postman test result about stack to interface document.

171870002 5 лет назад
Родитель
Сommit
1aaf3536f7
1 измененных файлов с 104 добавлено и 0 удалено
  1. 104 0
      data-structure接口返回值说明文档.md

+ 104 - 0
data-structure接口返回值说明文档.md

@@ -420,3 +420,107 @@ RESONSE:
 
   2.pop的返回值同push
 
+### (3)postman测试实例
+
+##### 1.push成功
+
+URL: localhost:8080/stack/push?capacity=10&content=1&content=2&content=3&value=4
+
+RESPONSE:
+
+{
+
+  "content": {
+
+​    "capacity": 10,
+
+​    "size": 4,
+
+​    "content": [
+
+​      1,
+
+​      2,
+
+​      3,
+
+​      4
+
+​    ]
+
+  },
+
+  "message": **null**,
+
+  "success": **true**
+
+}
+
+
+
+##### 2.push失败
+
+URL: localhost:8080/stack/push?capacity=3&content=1&content=2&content=3&value=4
+
+RESPONSE:
+
+{
+
+  "content": [
+
+​    1,
+
+​    2,
+
+​    3
+
+  ],
+
+  "message": "Error: stack overflow.",
+
+  "success": **false**
+
+}
+
+
+
+##### 3.pop成功
+
+URL:localhost:8080/stack/pop?capacity=10&content=1&content=2&content=3&content=4
+
+RESPONSE:
+
+{
+
+  "content": {
+
+​    "capacity": 10,
+
+​    "size": 4,
+
+​    "content": [
+
+​      1,
+
+​      2,
+
+​      3
+
+​    ]
+
+  },
+
+  "message": **null**,
+
+  "success": **true**
+
+}
+
+
+
+##### 5.pop失败
+
+备注:因为需要传空的content,不知道怎么传。
+
+
+