🎸 기타
[HTTP] HTTP 요청/응답 메시지
냥장판
2021. 3. 27. 18:05
반응형
클라이언트(client)가 웹서버에 요청을 보내고 응답을 받을때 사용하는 HTTP 메시지 구조를 알아보자.
요청(Request) 메세지

요청 메시지 구성 | 구성 상세 | 내용 |
Request line (요청 시작줄) |
Method (요청 방법) |
GET, POST, HEAD, PUT, CONNECT, UNLINK, LINK 등![]() |
URL (요청 URL) |
구분자로 구분된 URL * 구분자: 문서 경로(/), 쿼리 파라미터(?), URI 프래그먼트(#) |
|
Version (HTTP Version) |
- | |
Header lines (HTTP 요청 헤더) |
Header name: Value (헤더 이름: 값) |
* General Headers: 요청/응답 메세지 모두 사용 가능한 기본 항목 - Date, Connection, Cache-Control, Prama, Trailer 등 * Request Headers: 요청 메시지 내에서만 사용 가능한 항목 - Host, From, Cookie, Refere, User-Agent, Accept, If-Modified-Since 등 * Entity Headers: 선택적인 콘텐츠, 본문, 리소스 등의 개체 자체를 나타냄 - Content-Type, Content-Language, Content-Encoding, Location 등 |
Blank line (빈 줄/헤더의 끝) |
CR, LF | - |
Entity body (HTTP 본체) |
- | - |

응답(Response) 메세지

응답 메시지 구성 | 구성 상세 | 내용 |
Status line (응답 시작줄) |
Version (HTTP Version) |
- |
Status Code | 요청 성공여부에 대한 코드
|
|
Status Phrase | 위에 Status Code에 대한 Phrase | |
Header lines (HTTP 응답 헤더) |
Header name: Value (헤더 이름: 값) |
* General Headers: 요청/응답 메세지 모두 사용 가능한 기본 항목 - Date, Connection, Cache-Control, Prama, Trailer 등 * Response Headers: 응답 메시지 내에서만 사용 가능한 항목 - Server, Set-Cookie, Accept-Range 등 * Entity Headers: 선택적인 콘텐츠, 본문, 리소스 등의 개체 자체를 나타냄 - Content-Type, Content-Language, Content-Encoding, Location 등 |
Blank line (빈 줄/헤더의 끝) |
CR, LF | - |
Entity body (HTTP 본체) |
- | - |

http://www.ktword.co.kr/abbr_view.php?m_temp1=4884
HTTP 메세지 [정보통신기술용어해설]
www.ktword.co.kr
https://fedemengo.github.io/unibo/network/II/web-HTTP
Web and HTTP
Website to keep all my stuff.
fedemengo.github.io
https://www.tutorialspoint.com/http/http_requests.htm
HTTP - Requests - Tutorialspoint
HTTP - Requests An HTTP client sends an HTTP request to a server in the form of a request message which includes following format: A Request-line Zero or more header (General|Request|Entity) fields followed by CRLF An empty line (i.e., a line with nothing
www.tutorialspoint.com
반응형