Skip to content

HTTP API 🌴

KOSEUNGBIN edited this page Aug 12, 2020 · 1 revision

POST /api/rooms

Description

🎲 μ±„νŒ…λ°© 생성

Request Header

Content-Type: "application/json"

Request Body

{
	"title": "study spring"
}

Response Status Code

🐯201 => 생성 성곡

GET /api/rooms

Description

🎲 λͺ¨λ“  μ±„νŒ…λ°© 쑰회 

Request Header

Accept: "application/json"

Response Status Code

🐯200 => OK

Response Body

{
	"rooms": [
		{
			"id": 1,
			"title": "spring"
		},
		{
			"id": 2,
			"title": "react"
		}
	]
}

GET /api/rooms/{room_id}

Description

🎲 μ±„νŒ…λ°© 쑰회

Request Header

Accept: "application/json"

Response Status Code

🐯200 => OK

Response Body

{
	"room": {
			"id": 1,
			"title": "spring"
		},
	"messages": [
		{
			"id": 1,
			"contents": "hi",
			"createdAt": "2019-09-12 12:12:12",
			"messageType": "text"
		},
		{
			"id": 2,
			"contents": "ok",
			"createdAt": "2019-09-12 12:13:40",
			"messageType": "text"
		}
	]
}

🌿 슀크럼

08-16 / 08-18 / 08-23

Clone this wiki locally