加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
spring_postman_collection.json 7.53 KB
一键复制 编辑 原始数据 按行查看 历史
{
"info": {
"_postman_id": "6951e71b-f098-4959-a16e-89d2f5fde259",
"name": "玩转 Spring 全家桶",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "HATEOAS",
"item": [
{
"name": "创建订单",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"customer\": \"Han Meimei\",\n \"state\": \"INIT\",\n \"items\" : [\n \t\"http://localhost:8080/coffee/3\"\n \t] \n}"
},
"url": {
"raw": "http://localhost:8080/coffeeOrders/",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"coffeeOrders",
""
]
}
},
"response": []
},
{
"name": "向订单添加咖啡",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"_links\": {\n \"self\": {\n \"href\": \"http://localhost:8080/coffee/2\"\n }\n }\n}"
},
"url": {
"raw": "http://localhost:8080/coffeeOrders/1/items",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"coffeeOrders",
"1",
"items"
]
}
},
"response": []
},
{
"name": "创建咖啡",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"name\" : \"Americano\",\n\t\"price\" : 25.0\n}"
},
"url": {
"raw": "http://localhost:8080/coffee",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"coffee"
]
}
},
"response": []
},
{
"name": "推进订单状态",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"customer\": \"Li Lei\",\n\t\"state\": \"PAID\"\n}"
},
"url": {
"raw": "http://localhost:8080/coffeeOrders/1",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"coffeeOrders",
"1"
]
}
},
"response": []
}
]
},
{
"name": "查询咖啡",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/xml",
"type": "text",
"disabled": true
}
],
"url": {
"raw": "http://localhost:8080/coffee/?name=mocha",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"coffee",
""
],
"query": [
{
"key": "name",
"value": "mocha"
}
]
},
"description": "关注返回的Content-Type"
},
"response": []
},
{
"name": "创建订单",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json;charset=UTF-8",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"customer\": \"Li Lei\",\n \"items\": [\n \"mocha\"\n ]\n}"
},
"url": {
"raw": "http://localhost:8080/order/",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"order",
""
]
}
},
"response": []
},
{
"name": "创建单个咖啡 - \b表单",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/x-www-form-urlencoded",
"type": "text"
}
],
"body": {
"mode": "urlencoded",
"urlencoded": [
{
"key": "name",
"value": "Americano",
"type": "text"
},
{
"key": "price",
"value": "25.00",
"type": "text"
}
]
},
"url": {
"raw": "http://localhost:8080/coffee/",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"coffee",
""
]
}
},
"response": []
},
{
"name": "批量创建咖啡",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "multipart/form-data",
"type": "text",
"disabled": true
}
],
"body": {
"mode": "formdata",
"formdata": [
{
"key": "file",
"type": "file"
}
]
},
"url": {
"raw": "http://localhost:8080/coffee/",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"coffee",
""
]
}
},
"response": []
},
{
"name": "创建单个咖啡 - JSON",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"name\": \"Americano\",\n \"price\": 25.00\n}"
},
"url": {
"raw": "http://localhost:8080/coffee/",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"coffee",
""
]
}
},
"response": []
},
{
"name": "静态资源请求",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": ""
}
},
"response": []
},
{
"name": "Customer - 读菜单",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:8090/customer/menu",
"protocol": "http",
"host": [
"localhost"
],
"port": "8090",
"path": [
"customer",
"menu"
]
}
},
"response": []
},
{
"name": "Customer - 下单",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "http://localhost:8090/customer/order",
"protocol": "http",
"host": [
"localhost"
],
"port": "8090",
"path": [
"customer",
"order"
]
}
},
"response": []
},
{
"name": "支付订单",
"request": {
"method": "PUT",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"state\": \"PAID\"\n}"
},
"url": {
"raw": "http://localhost:8080/order/1",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"order",
"1"
]
}
},
"response": []
},
{
"name": "查询订单",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://localhost:8080/order/1",
"protocol": "http",
"host": [
"localhost"
],
"port": "8080",
"path": [
"order",
"1"
]
}
},
"response": []
}
]
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化