[ 참고용 블로그 ]
https://blog.naver.com/getinthere/222426449415?
1. 공통코드 code : 1 통신 정상 code : -1 통신 실패
2. 회원가입 요청 주소 (POST) - http://localhost:8080/join 요청 파라미터 - application/json { "username":"getinthere", "password":"1234", "email":"getinthere@nate.com" } 응답 바디 - application/json { "code": 1, "msg": "회원가입완료", "data": { "id": 3, "username": "getinthere", "password": null, "email": "getinthere@nate.com", "created": "2021-07-10T07:45:15.764705", "updated": "2021-07-10T07:45:15.764705" } }
3. 로그인 요청 주소 (POST) - http://localhost:8080/login 요청 파라미터 - application/json { "username":"getinthere", "password":"1234" } 응답 헤더 Authorization : Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJjb3PthqDtgbAiLCJpZCI6MywiZXhwIjoxNjI1ODc0Mzk1fQ.u_pUd7mwmE0KWWV_o7QDPkGg7Nyo_avYOwYwI5ZdIWluMltXfECQyYq9nVPzXGFZz89mOYLmYMazeYgfZwgVMw 응답 바디 - application/json { "code": 1, "msg": "success", "data": { "id": 3, "username": "getinthere", "password": "1234", "email": "getinthere@nate.com", "created": [ 2021, 7, 10, 7, 45, 15, 764705000 ], "updated": [ 2021, 7, 10, 7, 45, 15, 764705000 ] } }
이런 식으로 데이터를 던져주면 된다.
Share article