Skip to content
This repository was archived by the owner on Dec 13, 2020. It is now read-only.

3. RestCartController

Min Kuk Jo edited this page Sep 1, 2018 · 1 revision

장바구니 관련 (Cart)

공통된 요청 헤더

{
   Content-Type: application/json
   JSESSIONID
}

장바구니 조회

메소드 경로
GET /api/cart

응답 바디

{
    "data": [
        {
            "id": 17,
            "number": 2,
            "user": {
                "id": 2,
                "login": "mingood",
                "password": "bcb15f821479b4d5772bd0ca866c0ad5f926e358072659cc80d39c9d9802a"
            },
            "product": {
                "id": 1,
                "productName": "차량용방향제(통풍구형)-어피치",
                "productPrice": 13900,
                "imgUrl": "/res/img/1.jpg"
            }
        }
    ],
    "msg": "장바구니 조회"
}

장바구니 항목 개별 삭제

메소드 경로
DELETE /api/cart/{productId}

응답 바디

{
    "data": {
        "id": 17,
        "number": 2,
        "user": {
            "id": 2,
            "login": "mingood",
            "password": "bcb15f821479b4d5772bd0ca866c0ad5f926e358072659cc80d39c9d9802a"
        },
        "product": {
            "id": 1,
            "productName": "차량용방향제(통풍구형)-어피치",
            "productPrice": 13900,
            "imgUrl": "/res/img/1.jpg"
        }
    },
    "msg": "선택 상품 장바구니에서 삭제"
}

Clone this wiki locally