Skip to content

Commit

Permalink
feat : [Network] HTTP κ°œκ΄€(1) (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
sna0e authored Jan 2, 2025
1 parent 0c00ce2 commit 872fe51
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions Network/Intro_HTTP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
> 참고자료 : HTTP μ™„λ²½ κ°€μ΄λ“œ - 웹은 μ–΄λ–»κ²Œ λ™μž‘ν•˜λŠ”κ°€
# 1μž₯ HTTP κ°œκ΄€

## 1. HTTP

- HTTP : Hypertext Transfer Protocol
- World Wide Web 의 κΈ°λ³Έ μš”μ†Œ : HTTP ν΄λΌμ΄μ–ΈνŠΈ / HTTP μ„œλ²„
- HTTP ν”„λ‘œν† μ½œμ„ 톡해 톡신

## 2. λ¦¬μ†ŒμŠ€

- μ›Ή μ„œλ²„ : λ¦¬μ†ŒμŠ€ 관리 및 제곡

1. λ―Έλ””μ–΄ νƒ€μž… MIME : Multipurpose Internet Mail Extensions
- λ©€ν‹°λ―Έλ””μ–΄ μ½˜ν…μΈ λ₯Ό 기술 & 개발 κ°€λŠ₯
- μ›Ή μ„œλ²„ : HTTP obj 에 MIME νƒ€μž… λΆ™μž„ -> λ‹€λ£° 수 μžˆλŠ” 객체인지 확인
- e.g. `text/html` HTML λ¬Έμ„œ, `image/jpeg` JPEG 이미지 λ“±
2. URI : Uniform Resource Identifier
- 각 μ›Ή μ„œλ²„ λ¦¬μ†ŒμŠ€ 이름
- ν΄λΌμ΄μ–ΈνŠΈκ°€ URI λ₯Ό 톡해 νŠΉμ • λ¦¬μ†ŒμŠ€μ— μ ‘κ·Ό κ°€λŠ₯
`http://www.joes-hw.com/specials/saw-blade.gif`
- scheme `http://` : HTTP protocol
- internet addr of server `www.joes-hw.com` : www.joes-hw.com 으둜 이동
- resource in server `/specials/saw-blade.gif` : /specials/saw-blade.gif 라고 λΆˆλ¦¬λŠ” λ¦¬μ†ŒμŠ€ 지칭
3. URL : Uniform Resource Locator
- λ¦¬μ†ŒμŠ€ μ‹λ³„μžμ˜ ν”ν•œ ν˜•νƒœ
- νŠΉμ • μ„œλ²„μ˜ ν•œ λ¦¬μ†ŒμŠ€μ— λŒ€ν•œ ꡬ체적 μœ„μΉ˜
- μ˜€λŠ˜λ‚ , URI == URL

## 3. νŠΈλžœμž­μ…˜

- HTTP νŠΈλžœμž­μ…˜ = HTTP μš”μ²­ (c -> s) + HTTP 응닡 (s -> c)

1. HTTP λ©”μ„œλ“œ
- 1 method in 1 HTTP request msg
- GET : s -> c 둜 지정 λ¦¬μ†ŒμŠ€ λ³΄λ‚΄μ€˜
- PUT : c -> s 인 데이터λ₯Ό μ§€μ •ν•œ μ΄λ¦„μ˜ λ¦¬μ†ŒμŠ€λ‘œ μ €μž₯ν•΄μ‘°
- DELETE : μ§€μ •ν•œ λ¦¬μ†ŒμŠ€λ₯Ό s μ—μ„œ μ‚­μ œν•΄μ‘°
- POST : c data λ₯Ό s gateway app 으둜 보내쑰
- HEAD : μ§€μ •ν•œ λ¦¬μ†ŒμŠ€μ— λŒ€ν•œ μ‘λ‹΅μ—μ„œ HTTP header 만 μ‘°
2. μƒνƒœ μ½”λ“œ
- μƒνƒœ μ½”λ“œ in λͺ¨λ“  HTTP response
- c 의 μš”μ²­μ— λŒ€ν•œ λ°˜μ‘
- μƒνƒœ μ½”λ“œ & resson phrase
- 200 OK
- 200 Document attached
3. λŒ€λŸ‰μ˜ νŠΈλžœμž­μ…˜ μˆ˜ν–‰
- μ›Ή νŽ˜μ΄μ§€ == λ¦¬μ†ŒμŠ€μ˜ λͺ¨μŒμ§‘

## 4. λ©”μ‹œμ§€

![HTTP MSG](ny_http_msg.png)
Binary file added Network/ny_http_msg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 872fe51

Please sign in to comment.