Skip to Content
한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트
book

한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트

by 한성용, 이선 브라운
April 2016
Beginner to intermediate
389 pages
9h 8m
Korean
Hanbit Media, Inc.
Content preview from 한 권으로 끝내는 Node & Express: 웹사이트 구축을 위한 서버 사이드 자바스크립트
89
6
-
요청과 응답 객체
브라우저에서 앵커 태그(
<
a
id
=
"
chapter06
">
)로 표시한 문서의 특정 부분을 찾아가도록 하는
것이 유일한 목적이었습니다.
6.2.
HTTP
요청 규칙
HTTP
프로토콜에는 클라이언트가 서버와 통신하는 요청 규칙
request
method
(
HTTP
동사
verb
라고
도 부릅니다) 정의가 들어 있습니다. 가장 널리 쓰이는 규칙은
GET
POST
입니다.
브라우저에
URL
을 입력하거나 링크를 클릭하면 브라우저는 서버에
HTTP
GET
요청을 보냅니
다. 서버로 보내지는 중요한 정보는
URL
경로와 쿼리스트링입니다. 앱은 규칙, 경로, 쿼리스
트링에 따라 어떻게 응답할지 결정합니다.
웹사이트의 대부분 페이지는
GET
요청에 응답합니다.
POST
요청은 보통 서버에 정보를 보낼
때 사용합니다. 서버는 요청에 포함된 정보를 처리한 후 응답을 보내는데, 정보가
POST
요청으
로 들어왔든
GET
요청으로 들어왔든 응답
HTML
은 대개 같습니다. 브라우저는 서버와 통신할
AJAX
또는
GET
POST
만 사용합니다.
반면 웹 서비스는
HTTP
규칙을 좀 더 창의적으로 쓸 때가 많습니다. 예를 들어
API
호출을 통
해 뭔가를 지울 때 유용한
DELETE
라는
HTTP
규칙이 있습니다.
노드와 익스프레스를 쓸 때는 어떤 요청에 응답할지가 완전히 자유입니다(개중에는 널리 쓰이
지 않아서 잘 지원되지 않는 것도 물론 있습니다). 익스프레스에서는 보통 핸들러를 통해 요청
에 응답합니다.
6.3.
요청 헤더
페이지로 이동할 때
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것

한 권으로 끝내는 Node & Express(2판): 모던 웹을 위한 서버 사이드 자바스크립트의 모든 것

한선용, 이선 브라운

Publisher Resources

ISBN: 9788968482229