- νμκ°μ
- νμ κ°μ
μ±κ³΅νμ λ
- νμ κ°μ
μ€ν¨νμ λ (μ€λ³΅λ μμ΄λ)
- λ‘κ·ΈμΈ
- λ‘κ·ΈμΈ μ±κ³΅νμ λ
- λ‘κ·ΈμΈ μ€ν¨νμ λ (μλͺ»λ ID, PASSWORD μ
λ ₯)
- λ‘κ·Έμμ
- λ§μ΄νμ΄μ§ (κ°μΈμ 보 μ‘°ν)
Path |
Type |
Description |
loginId |
String |
λ‘κ·ΈμΈ μμ΄λ |
password |
String |
λΉλ°λ²νΈ |
name |
String |
μ΄μ©μ μ΄λ¦ |
email |
String |
μ΄μ©μ μ΄λ©μΌ |
city |
String |
μ£Όμ λμ |
street |
String |
μ£Όμ μ§μ |
zipcode |
String |
μ£Όμ μ°νΈλ²νΈ |
1. νμ κ°μ
μ±κ³΅νμ λ
POST http://localhost:8080/api/users
Content-Type: multipart/form-data;
Content-Length: 186081
Host: localhost:8080
Request Body { loginId: "test20", password: "test20!", name: "userAA", email: "[email protected]", city: "bucheon", street: "sosa", zipcode: "1234" }
HTTP 201 Created
Content-Type: application/json
response body {"name":"userAA","email":"[email protected]","password":"test20!"}
2. νμ κ°μ
μ€ν¨νμ λ (μ€λ³΅λ μμ΄λ)
HTTP 409 Conflict
Content-Type: text/plain;charset=UTF-8
Content-Length: 39
Response Body : μ΄λ―Έ μ‘΄μ¬νλ μμ΄λμ
λλ€.
Path |
Type |
Description |
loginId |
String |
λ‘κ·ΈμΈ μμ΄λ |
password |
String |
λΉλ°λ²νΈ |
1. λ‘κ·ΈμΈ μ±κ³΅νμ λ
POST /api/users/login
Content-Type: multipart/form-data
Content-Length: 282
Host: localhost:8080
Request Body : { loginId: "test20", password: "test20!"}
HTTP 200 ok
Response Body :{"loginId":"test20","password":"test20!"}
2. λ‘κ·ΈμΈ μ€ν¨νμ λ (μλͺ»λ ID, PASSWORD μ
λ ₯)
HTTP 404 Not Found
Content-Type : text/plain;charset=UTF-8
Content-Length : 59
Response Body : μμ΄λ λλ λΉλ°λ²νΈκ° μΌμΉνμ§ μμ΅λλ€.
HTTP 200 OK
Response Body : {"success":true,"message":"logout success!"}
GET /api/users/info
Content-Type: multipart/form-data
Content-Length: 167
Host: localhost:8080
Request Body : { loginId: "test2"}
HTTP 200 ok
Content-Type: application/json
Response Body : {"email":"[email protected]","name":"userB","city":"μ§μ£Ό","income":0}