๐Ÿ“š TIL 28์ผ์ฐจ

temprmnยท2023๋…„ 6์›” 23์ผ
0
post-thumbnail

์˜ค๋Š˜์˜ ์ฃผ์š”์‚ฌํ•ญ (6/23, ๊ธˆ์š”์ผ)

  1. Lv2 ๊ณผ์ œ ์™„๋ฃŒ

Lv2 ๊ณผ์ œ Repository

Spring-CRUD-Lv2

์ผ๋‹จ ๋๋‚ด๊ณ , ์ œ์ถœ ์ „๊นŒ์ง€ ์ถ”๊ฐ€๋กœ ํ•™์Šตํ•œ ๊ฒƒ๋“ค์„ ํ† ๋Œ€๋กœ ๋ฆฌํŒฉํ† ๋ง ํ•ด ๋ณผ ์ƒ๊ฐ์ด๋‹ค.

API ๋ช…์„ธ

๊ตฌ๋ถ„MethodURLRequest HeadRequestResponseResponse Header
ํšŒ์›๊ฐ€์ž…POST/blog/auth/signup-{
"username":"user1234",
"password":"Password1234"
}
{
"msg":"ํšŒ์›๊ฐ€์ž… ์„ฑ๊ณต",
"statusCode":200
}
-
๋กœ๊ทธ์ธPOST/blog/auth/login-{
"username":"user1234",
"password":"Password1234"
}
{
"msg":"๋กœ๊ทธ์ธ ์„ฑ๊ณต",
"statusCode":200
}
Authorization:
Bearer
eyJhbGciOiJIUzI1NiJ9.eyJzdW
IiOiJ1c2VyMTIzNCIsImV4cCI
6MTY4NzUzNTUyNywiaWF0I
joxNjg3NTMxOTI3fQ.ZUDqo
EhmxqEMj8B6AreqdiCbDo4e
sMaraS_U2k6GNuM
๊ฒŒ์‹œ๊ธ€ ์ž‘์„ฑPOST/blog/writeAuthorization:
Bearer
eyJhbGciOiJIUzI1NiJ9.eyJzdW
IiOiJ1c2VyMTIzNCIsImV4cCI
6MTY4NzUzNTUyNywiaWF0I
joxNjg3NTMxOTI3fQ.ZUDqo
EhmxqEMj8B6AreqdiCbDo4e
sMaraS_U2k6GNuM
{
"title":"์ œ๋ชฉ1",
"content":"๋‚ด์šฉ1"
}
{
"createdAt":"2023-06-23T12:56:36.821474",
"modifiedAt":"2023-06-23T12:56:36.821474"
"id":1,
"title":"๊ฒŒ์‹œ๊ธ€1"
"content":"๋‚ด์šฉ1"
"username":"user1234"
}
์ „์ฒด ๊ฒŒ์‹œ๊ธ€ ๋ชฉ๋ก ์กฐํšŒGET/blog/posts-{
"title":"์ œ๋ชฉ1",
"content":"๋‚ด์šฉ1"
}
{
{
"createdAt":"2023-06-24T12:56:36.821474",
"modifiedAt":"2023-06-24T12:56:36.821474"
"id":2,
"title":"๊ฒŒ์‹œ๊ธ€2"
"content":"๋‚ด์šฉ2"
"username":"user1234"
},
{
"createdAt":"2023-06-23T12:56:36.821474",
"modifiedAt":"2023-06-23T12:56:36.821474"
"id":1,
"title":"๊ฒŒ์‹œ๊ธ€1"
"content":"๋‚ด์šฉ1"
"username":"user1234"
}
}
-
์„ ํƒํ•œ ๊ฒŒ์‹œ๊ธ€ ์กฐํšŒGET/blog/posts/{id}-{
"createdAt":"2023-06-24T12:56:36.821474",
"modifiedAt":"2023-06-24T12:56:36.821474"
"id":2,
"title":"๊ฒŒ์‹œ๊ธ€2"
"content":"๋‚ด์šฉ2"
"username":"user1234"
}
-
์„ ํƒํ•œ ๊ฒŒ์‹œ๊ธ€ ์ˆ˜์ •PUT/blog/posts/{id}Authorization:
Bearer
eyJhbGciOiJIUzI1NiJ9.eyJzdW
IiOiJ1c2VyMTIzNCIsImV4cCI
6MTY4NzUzNTUyNywiaWF0I
joxNjg3NTMxOTI3fQ.ZUDqo
EhmxqEMj8B6AreqdiCbDo4e
sMaraS_U2k6GNuM
{
"title":"์ œ๋ชฉ2์ˆ˜์ •",
"content":"๋‚ด์šฉ2์ˆ˜์ •"
}
{
"createdAt":"2023-06-24T12:56:36.821474",
"modifiedAt":"2023-06-25T12:56:36.821474"
"id":2,
"title":"๊ฒŒ์‹œ๊ธ€2์ˆ˜์ •"
"content":"๋‚ด์šฉ2์ˆ˜์ •"
"username":"user1234"
}
-
์„ ํƒํ•œ ๊ฒŒ์‹œ๊ธ€ ์‚ญ์ œDELETE/blog/posts/{id}Authorization:
Bearer
eyJhbGciOiJIUzI1NiJ9.eyJzdW
IiOiJ1c2VyMTIzNCIsImV4cCI
6MTY4NzUzNTUyNywiaWF0I
joxNjg3NTMxOTI3fQ.ZUDqo
EhmxqEMj8B6AreqdiCbDo4e
sMaraS_U2k6GNuM
-{
"msg":"๊ฒŒ์‹œ๊ธ€ ์‚ญ์ œ ์„ฑ๊ณต",
"statusCode":200
}
-
profile
`ISFJ` T 49% F 51% /

0๊ฐœ์˜ ๋Œ“๊ธ€