HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
💌
JJong’s Archive
/
HTTP 메시지

HTTP 메시지

Tags
네트워크
Study Date
Oct 19, 2023
Status
Done
Day
notion image
 

요청

⇒ 클라이언트가 서버로 전달해서 서버의 액션이 일어나게 하는 것
notion image
  1. start-line
    1. 1) method
      2) 요청 타겟
      3) http 버전
       
  1. header
    1. 1) connection 같은 일반헤더
      2) host, user-agent 같은 요청헤더
      3) content-type, content-length 같은 표현헤더
      • content-type : 메시지 데이터의 원래 형식 & 적용된 인코딩을 설명(body가 있을 때만), ex) application/json
       
  1. body (optional)
      • GET, DELETE등 리소스를 가져오는 것은 body 필요x
      • POST 같은 요청은 업데이트를 하기 위해 서버에 데이터를 전송
      1-1) 단일 리소스 : 헤더 두개(content-type, content-length)로 정의되는 하나의 파일
      1-2) 다중 리소스

응답

⇒ 요청에 대한 서버의 답변
notion image
  1. start-line
    1. 1) 보통 HTTP/1.1인 프로토콜 버전
      2) 상태코드 (요청의 성공 여부)
      3) 상태텍스트
      • 상태 코드에 대한 짧은 설명(ex. Not Found.)
 
  1. header
      • connection, date, keep-alive 같은 일반헤더
      • server 같은 응답헤더
      • content-type 같은 표현 헤더
       
  1. body
    1. 1-1) 단일 리소스 - content-type, content-length로 정의되는 길이를 아는 하나의 파일
      1-2) 단일 리소스 - 인코딩 되는 길이를 모르는 하나의 파일
      1-3) 다중 리소스 (보기 드뭄)