Header field
Request
Query Parameters
위치: URL
GET /search?q=cat&page=1
q=cat
page=1
?q=cat&page=1 부분을 Query string이라고 함
Path Parameters
위치: URL
GET /users/1
Header Fields 또는 HTTP Headers
위치: 요청 헤더
Authorization: Bearer 토큰값
Content-Type: application/json
Form Data Parameters
위치: 요청 본문
application/x-www-form-urlencoded나 multipart/form-data로 전송됨
웹 폼에서 주로 사용
POST /submit
Content-Type: application/x-www-form-urlencoded
name=John&age=30
POST /upload
Content-Type: multipart/form-data
Body Parameters
위치: 요청 본문
주로 POST, PUT, PATCH 요청에서 사용
{
"username": "john",
"password": "doh"
}
Response
Status Line
상태줄
HTTP/1.1 200 OK
[HTTP Version] [Status Code] [Reason Phrase]
Header Fields
Content-Type: application/json
Content-Length: 369
Body
{
"id": 1,
"name": "John Doe",
"role": "admin"
}
Document template
Request
정의
Request
Method, Path
Name Required Data type Example Default value Description
Response
Header field
Name Value
Body
Name Data type (Length) Nullable Description
응답 필드는 추후 공지 없이 추가될 수 있음
예 > 성공
예 > 실패