리소스를 식별하는 통합된 방법
"URI는 로케이터(locator), 이름(name) 또는 둘 다 추가로 분류될 수 있다."
"리소스 식별"이라는 의미의 URI안에 URL과 URN이 포함된다. 리소스를 식별한다는 것은 주민번호를 통해 사람을 식별하듯이 URI를 통해 리소스를 식별함을 의미한다.
URI에는 URL, Resorces Locator, "리소스의 위치"가 포함되고, URN, Resorces Name, "리소스의 이름"이 포함된다.
주로 사용되는 것은 URL. URL은 이런 존재가 있다, 정도만 알면 됨.
Uniform: 리소스 식별하는 통일된 방식
Resource: 자원, URI로 식별할 수 있는 모든 것(제한 없음)
Identifier: 다른 항목과 구분(식별)하는 데 필요한 정보
google에 "hello"라는 단어를 검색하는 uri.
- scheme://[userinfo@]host[:port][/path][?query][#fragment]
- https://www.google.com:443/search?q=hello&hl=ko
- scheme://[userinfo@]host[:port][/path][?query][#fragment]
- https://www.google.com:443/search?q=hello&hl=ko
- scheme:// [userinfo@] host[:port][/path][?query][#fragment]
- https://www.google.com:443/search?q=hello&hl=ko
- scheme://[userinfo@] host [:port][/path][?query][#fragment]
- https:// www.google.com: 443/search?q=hello&hl=ko
- scheme://[userinfo@]host [:port] [/path][?query][#fragment]
- https://www.google.com: 443 /search?q=hello&hl=ko
- scheme://[userinfo@]host[:port] [/path] [?query][#fragment]
- https://www.google.com:443/ search ?q=hello&hl=ko
- scheme://[userinfo@]host[:port][/path] [?query] [#fragment]
- https://www.google.com:443/search ?q=hello&hl=ko
- scheme://[userinfo@]host[:port][/path][?query] [#fragment]
- https://docs.spring.io/spring-boot/docs/current/reference/html/gettingstarted.html #getting-started-introducing-spring-boot
1. DNS 서버 조회
2. PORT 생략 (HTTPS = 443)
3. 클라이언트에서 HTTP 요청 메시지 생성
HTTP 요청 메시지 형태는 다음과 같다.
GET 요청, PATH +query Parameter / HTTP 버전 정보/ host 정보
웹 브라우저가 HTTP 메시지 생성
SOCKET 라이브러리를 통해 전달
TCP/IP 패킷 생성, HTTP 메시지 포함
전송 데이터: 웹 브라우저가 만든 HTTP 메시지
요청 패킷이 노드를 타고 서버로 전달된다.
요청 패킷이 전달되면 서버가 TCP/IP패킷을 다 까서 안의 요청 메시지를 해석한다.
서버에서 답장을 위한 HTTP 응답 메시지를 생성한다.
클라이언트측에서 받은 데이터의 패킷을 벗기고 안의 데이터들을 렌더링한다.