You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
geektime-spring-family/spring_postman_collection.json

418 lines
7.5 KiB
JSON

{
"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": []
}
]
}