- HTTP 요청 메시지 - GET (요청 메서드)
- 서버에게 리소스를 요청해서 얻어옴
- 바디는 없고 쿼리스트링으로 데이터를 보낼수 있음
- 쿼리스트링 - year=2021&month=10&day=1
- Read (리소스 얻어오기)
Header
GET/ch2/getYoil?year=2021&month=10&day=1 HTTP/1.1 (요청라인, request line)
Host: 111.22.33.44:8080
User-Agent: Mozilla/5.0 (Windows NT 10.0)
Accept : text/html
Connection: keep-alive
—-빈줄 - 헤더, 바디 구분—-
body
없음
- HTTP 요청 메시지 - POST (요청 메서드)
- 서버에 전송할 data - year=2021&month=10&day=1(바디에 담고 있음)
- Write(데이터 제공) - 글쓰기 , 로그인, 회원가입, 파일첨부
Header
POST/ch2/getYoil HTTP/1.1 (요청라인, request line)
Host: 111.22.33.44:8080
User-Agent: Mozilla/5.0 (Windows NT 10.0)
Accept : text/html
Connection: keep-alive
—-빈줄 - 헤더, 바디 구분—-
Body
year=2021&month=10&day=1
'Spring' 카테고리의 다른 글
응답 클래스 분리 (서비스의 정책) (0) | 2022.10.11 |
---|---|
[Spring/스프링] @RequestBody (0) | 2022.07.23 |
[Spring/스프링] HTTP 메시지 - 응답 메시지 (0) | 2022.07.23 |
[Spring/스프링] Cookie (0) | 2022.07.12 |
[Spring/스프링] redirect , forward (0) | 2022.07.12 |