<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>웹개발기초 보관 - 하우인포-IT·테크</title>
	<atom:link href="https://howinfo.kr/tag/%ec%9b%b9%ea%b0%9c%eb%b0%9c%ea%b8%b0%ec%b4%88/feed/" rel="self" type="application/rss+xml" />
	<link>https://howinfo.kr/tag/웹개발기초/</link>
	<description>IT·AI 자동화 &#38; 인프라 전문 블로그 (하우인포)</description>
	<lastBuildDate>Sat, 21 Feb 2026 02:04:41 +0000</lastBuildDate>
	<language>ko-KR</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://howinfo.kr/wp-content/uploads/2026/02/cropped-ChatGPT-Image-2026년-2월-12일-오후-05_39_40-32x32.png</url>
	<title>웹개발기초 보관 - 하우인포-IT·테크</title>
	<link>https://howinfo.kr/tag/웹개발기초/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>로그인 상태는 어떻게 유지될까? 쿠키·세션 초보자 실전 가이드</title>
		<link>https://howinfo.kr/%ec%bf%a0%ed%82%a4%ec%99%80-%ec%84%b8%ec%85%98%ec%9d%98-%ec%b0%a8%ec%9d%b4-php-python-%ec%bd%94%eb%93%9c-%ec%98%88%ec%8b%9c-%ed%8f%ac%ed%95%a8/</link>
					<comments>https://howinfo.kr/%ec%bf%a0%ed%82%a4%ec%99%80-%ec%84%b8%ec%85%98%ec%9d%98-%ec%b0%a8%ec%9d%b4-php-python-%ec%bd%94%eb%93%9c-%ec%98%88%ec%8b%9c-%ed%8f%ac%ed%95%a8/#respond</comments>
		
		<dc:creator><![CDATA[hong]]></dc:creator>
		<pubDate>Sun, 15 Feb 2026 06:57:56 +0000</pubDate>
				<category><![CDATA[IT기초]]></category>
		<category><![CDATA[flask세션]]></category>
		<category><![CDATA[php세션]]></category>
		<category><![CDATA[보안기초]]></category>
		<category><![CDATA[웹개발기초]]></category>
		<category><![CDATA[웹로그인관리]]></category>
		<category><![CDATA[쿠키설정]]></category>
		<category><![CDATA[쿠키세션차이]]></category>
		<guid isPermaLink="false">https://howinfo.kr/?p=1694</guid>

					<description><![CDATA[<p>0️⃣ 상단 요약 5줄 1️⃣ 상황으로 시작: “새로고침하면 왜 로그인 상태가 유지될까?” 처음 웹 개발을 할 때 제일 신기했던 게...</p>
<p>게시물 <a href="https://howinfo.kr/%ec%bf%a0%ed%82%a4%ec%99%80-%ec%84%b8%ec%85%98%ec%9d%98-%ec%b0%a8%ec%9d%b4-php-python-%ec%bd%94%eb%93%9c-%ec%98%88%ec%8b%9c-%ed%8f%ac%ed%95%a8/">로그인 상태는 어떻게 유지될까? 쿠키·세션 초보자 실전 가이드</a>이 <a href="https://howinfo.kr">하우인포-IT·테크</a>에 처음 등장했습니다.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">0️⃣ 상단 요약 5줄</h2>



<ul class="wp-block-list">
<li><strong>쿠키</strong>는 브라우저(사용자 PC)에 저장되는 작은 정보입니다.</li>



<li><strong>세션</strong>은 서버에 저장되는 사용자 상태 정보입니다.</li>



<li>대부분 로그인은 <strong>세션을 만들고, 세션 ID를 쿠키로 들고 다니는 방식</strong>입니다.</li>



<li>쿠키에 비밀번호 같은 민감 정보를 저장하면 위험합니다.</li>



<li>아래 예제로 “쿠키/세션이 실제로 어떻게 동작하는지” 바로 확인할 수 있습니다.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">1️⃣ 상황으로 시작: “새로고침하면 왜 로그인 상태가 유지될까?”</h2>



<p>처음 웹 개발을 할 때 제일 신기했던 게 이거였습니다.</p>



<ul class="wp-block-list">
<li>로그인 한 번 했는데</li>



<li>새로고침을 해도</li>



<li>다른 페이지로 이동해도</li>



<li>계속 로그인 상태가 유지됨</li>
</ul>



<p>그런데 HTTP는 기본적으로 <strong>기억력이 없습니다(stateless)</strong>.<br>즉, 요청을 한 번 보내고 끝… “이 사람이 누구인지” 원래는 모릅니다.</p>



<p>그래서 로그인은 보통 이렇게 구현됩니다.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>서버가 세션을 만들고 → 브라우저는 세션 ID를 쿠키로 저장 → 다음 요청마다 쿠키를 같이 보냄</p>
</blockquote>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">2️⃣ 한 문장 정의</h2>



<ul class="wp-block-list">
<li><strong>쿠키(Cookie)</strong>: 브라우저에 저장되는 정보</li>



<li><strong>세션(Session)</strong>: 서버에 저장되는 사용자 상태 정보</li>



<li>실무에선 대부분 <strong>세션 ID를 쿠키로 들고 다닌다</strong></li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">3️⃣ 한 장으로 정리: 차이점 표</h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>구분</th><th>쿠키</th><th>세션</th></tr></thead><tbody><tr><td>저장 위치</td><td>브라우저</td><td>서버</td></tr><tr><td>보안</td><td>상대적으로 취약</td><td>비교적 안전</td></tr><tr><td>용량</td><td>작음</td><td>비교적 자유</td></tr><tr><td>만료</td><td>설정 가능</td><td>서버 정책에 따름</td></tr><tr><td>주 용도</td><td>식별자/설정</td><td>로그인 상태/권한</td></tr></tbody></table></figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">4️⃣ 왜 둘을 같이 쓸까?</h2>



<p>로그인은 “매 요청마다 이 사람이 누구인지” 알아야 합니다.</p>



<p>하지만 서버가 매번 “로그인 정보 전체”를 들고 다니게 하면 부담이고 위험합니다.</p>



<p>그래서 절충안이 등장합니다.</p>



<ol class="wp-block-list">
<li>로그인 성공</li>



<li>서버가 세션 생성(서버 저장소에 user 정보 저장)</li>



<li>세션을 구분하는 <strong>세션 ID만 쿠키로 내려줌</strong></li>



<li>다음 요청부터 브라우저는 쿠키(세션 ID)를 자동 전송</li>



<li>서버는 세션 ID로 사용자 확인</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">5️⃣ 미니 실습 1: PHP 세션 로그인/로그아웃</h2>



<p>PHP는 <code>session_start()</code>만 해도<br>브라우저 쿠키에 **PHPSESSID(세션 ID)**를 자동으로 심습니다.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>“세션 만들고 → 세션 ID를 쿠키로 내려준다”가 자동으로 구현되는 셈입니다.</p>
</blockquote>



<h3 class="wp-block-heading">login.php</h3>



<pre class="wp-block-preformatted">&lt;?php<br>session_start();$valid_user = "howinfo";<br>$valid_pass = "1234";$user = $_POST["user"] ?? "";<br>$pass = $_POST["pass"] ?? "";if ($user === $valid_user &amp;&amp; $pass === $valid_pass) {<br>    $_SESSION["user"] = $user;<br>    $_SESSION["login_time"] = time();<br>    echo "로그인 성공! &lt;a href='mypage.php'&gt;마이페이지&lt;/a&gt;";<br>} else {<br>    echo "로그인 실패. &lt;a href='index.html'&gt;다시 시도&lt;/a&gt;";<br>}</pre>



<h3 class="wp-block-heading">mypage.php</h3>



<pre class="wp-block-preformatted">&lt;?php<br>session_start();if (!isset($_SESSION["user"])) {<br>    echo "로그인이 필요합니다. &lt;a href='index.html'&gt;로그인&lt;/a&gt;";<br>    exit;<br>}$user = $_SESSION["user"];<br>$login_time = date("Y-m-d H:i:s", $_SESSION["login_time"]);echo "&lt;h2&gt;환영합니다, {$user}님&lt;/h2&gt;";<br>echo "&lt;p&gt;로그인 시간: {$login_time}&lt;/p&gt;";<br>echo "&lt;a href='logout.php'&gt;로그아웃&lt;/a&gt;";</pre>



<h3 class="wp-block-heading">logout.php</h3>



<pre class="wp-block-preformatted">&lt;?php<br>session_start();<br>session_unset();<br>session_destroy();echo "로그아웃 완료. &lt;a href='index.html'&gt;처음으로&lt;/a&gt;";</pre>



<p>✅ 확인 포인트(진짜 중요한 부분)</p>



<ul class="wp-block-list">
<li>개발자 도구 → Application/Storage → Cookies</li>



<li><code>PHPSESSID</code> 같은 값이 생겼으면 “세션 ID가 쿠키로 내려간 것”입니다.</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">6️⃣ 미니 실습 2: 쿠키를 직접 다뤄보기(자동 로그인 느낌)</h2>



<p>주의: <strong>비밀번호를 쿠키에 저장하는 건 금지</strong>입니다.<br>예제는 사용자명만 저장합니다.</p>



<h3 class="wp-block-heading">set_cookie.php</h3>



<pre class="wp-block-preformatted">&lt;?php<br>setcookie(<br>  "remember_user",<br>  "howinfo",<br>  time() + (60 * 60 * 24 * 7),<br>  "/",<br>  "",<br>  true,<br>  true<br>);echo "쿠키 저장 완료. &lt;a href='read_cookie.php'&gt;쿠키 확인&lt;/a&gt;";</pre>



<h3 class="wp-block-heading">read_cookie.php</h3>



<pre class="wp-block-preformatted">&lt;?php<br>$user = $_COOKIE["remember_user"] ?? "";if ($user) echo "쿠키에 저장된 사용자: {$user}";<br>else echo "쿠키가 없습니다.";</pre>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">7️⃣ 미니 실습 3: Python Flask 세션 로그인</h2>



<p>Flask도 세션을 쓰면 내부적으로 <strong>세션 ID를 쿠키로 관리</strong>합니다.<br>즉 구조는 PHP와 같습니다.</p>



<p>설치:</p>



<pre class="wp-block-preformatted">pip install flask</pre>



<p>app.py:</p>



<pre class="wp-block-preformatted">from flask import Flask, request, session, redirect, url_forapp = Flask(__name__)<br>app.secret_key = "howinfo-secret-key"  # 실전에서는 환경변수 추천VALID_USER = "howinfo"<br>VALID_PASS = "1234"@app.route("/")<br>def home():<br>    user = session.get("user")<br>    if user:<br>        return f"✅ 로그인 상태: {user} | &lt;a href='/mypage'&gt;마이페이지&lt;/a&gt; | &lt;a href='/logout'&gt;로그아웃&lt;/a&gt;"<br>    return """<br>    &lt;h3&gt;로그인&lt;/h3&gt;<br>    &lt;form method="post" action="/login"&gt;<br>      &lt;input name="user" placeholder="user"&gt;&lt;br&gt;<br>      &lt;input name="pass" placeholder="pass" type="password"&gt;&lt;br&gt;<br>      &lt;button type="submit"&gt;로그인&lt;/button&gt;<br>    &lt;/form&gt;<br>    """@app.route("/login", methods=["POST"])<br>def login():<br>    user = request.form.get("user", "")<br>    pw = request.form.get("pass", "")<br>    if user == VALID_USER and pw == VALID_PASS:<br>        session["user"] = user<br>        return redirect(url_for("mypage"))<br>    return "로그인 실패 &lt;a href='/'&gt;돌아가기&lt;/a&gt;"@app.route("/mypage")<br>def mypage():<br>    user = session.get("user")<br>    if not user:<br>        return redirect(url_for("home"))<br>    return f"&lt;h2&gt;환영합니다, {user}님&lt;/h2&gt;&lt;a href='/logout'&gt;로그아웃&lt;/a&gt;"@app.route("/logout")<br>def logout():<br>    session.clear()<br>    return redirect(url_for("home"))if __name__ == "__main__":<br>    app.run(host="0.0.0.0", port=5000, debug=True)</pre>



<p>실행:</p>



<pre class="wp-block-preformatted">python app.py</pre>



<p>접속:</p>



<ul class="wp-block-list">
<li><code>http://localhost:5000</code></li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">8️⃣ 자주 하는 실수 TOP3 (실무에서 진짜 많이 봄)</h2>



<ol class="wp-block-list">
<li>쿠키에 비밀번호/민감정보 저장<br>→ 세션 탈취/노출 시 바로 사고</li>



<li>HTTPS 없이 로그인 운영<br>→ 세션 ID 가로채기 위험 증가</li>



<li>쿠키 보안 옵션을 안 줌<br>→ Secure/HttpOnly/SameSite는 기본값으로 넣는 게 안전</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">9️⃣ 체크리스트</h2>



<ul class="wp-block-list">
<li>세션은 서버에, 세션 ID는 쿠키로 내려간다</li>



<li>개발자 도구에서 쿠키(PHPSESSID 등)를 확인했다</li>



<li>쿠키에 민감정보를 저장하지 않는다</li>



<li>Secure/HttpOnly/SameSite 옵션 의미를 안다</li>



<li>쿠키 삭제 시 로그인 풀림을 직접 확인했다</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">FAQ</h1>



<p><strong>Q1. 자동 로그인은 쿠키만으로 구현하나요?</strong><br>대부분은 “긴 만료 쿠키 + 서버 토큰(리프레시 토큰)” 조합을 씁니다.</p>



<p><strong>Q2. 세션은 서버 메모리를 많이 쓰나요?</strong><br>사용자가 많으면 부담이 됩니다. 그래서 Redis 같은 세션 저장소를 쓰기도 합니다.</p>



<p><strong>Q3. 쿠키를 삭제하면 어떻게 되나요?</strong><br>세션 ID 쿠키가 없어지면 서버는 사용자를 식별하지 못해서 로그인이 풀립니다.</p>



<p></p>
<p>게시물 <a href="https://howinfo.kr/%ec%bf%a0%ed%82%a4%ec%99%80-%ec%84%b8%ec%85%98%ec%9d%98-%ec%b0%a8%ec%9d%b4-php-python-%ec%bd%94%eb%93%9c-%ec%98%88%ec%8b%9c-%ed%8f%ac%ed%95%a8/">로그인 상태는 어떻게 유지될까? 쿠키·세션 초보자 실전 가이드</a>이 <a href="https://howinfo.kr">하우인포-IT·테크</a>에 처음 등장했습니다.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://howinfo.kr/%ec%bf%a0%ed%82%a4%ec%99%80-%ec%84%b8%ec%85%98%ec%9d%98-%ec%b0%a8%ec%9d%b4-php-python-%ec%bd%94%eb%93%9c-%ec%98%88%ec%8b%9c-%ed%8f%ac%ed%95%a8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>REST API 쉽게 이해하기</title>
		<link>https://howinfo.kr/rest-api-%ec%89%bd%ea%b2%8c-%ec%9d%b4%ed%95%b4%ed%95%98%ea%b8%b0/</link>
					<comments>https://howinfo.kr/rest-api-%ec%89%bd%ea%b2%8c-%ec%9d%b4%ed%95%b4%ed%95%98%ea%b8%b0/#respond</comments>
		
		<dc:creator><![CDATA[hong]]></dc:creator>
		<pubDate>Fri, 13 Feb 2026 14:41:43 +0000</pubDate>
				<category><![CDATA[IT기초]]></category>
		<category><![CDATA[API개념]]></category>
		<category><![CDATA[GET POST차이]]></category>
		<category><![CDATA[HTTP메소드]]></category>
		<category><![CDATA[JSON이해하기]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[서버통신]]></category>
		<category><![CDATA[웹개발기초]]></category>
		<guid isPermaLink="false">https://howinfo.kr/?p=1643</guid>

					<description><![CDATA[<p>초보자도 이해하는 REST 개념 정리 📌 REST API가 뭐길래 이렇게 많이 들릴까? 요즘 이런 말 많이 들어보셨죠? 그런데 실제로는 생각보다...</p>
<p>게시물 <a href="https://howinfo.kr/rest-api-%ec%89%bd%ea%b2%8c-%ec%9d%b4%ed%95%b4%ed%95%98%ea%b8%b0/">REST API 쉽게 이해하기</a>이 <a href="https://howinfo.kr">하우인포-IT·테크</a>에 처음 등장했습니다.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">초보자도 이해하는 REST 개념 정리</h2>



<figure class="wp-block-image is-resized"><img decoding="async" src="https://images.openai.com/static-rsc-3/nsetL_1lFjxts-XUQqekPA30IVAzJR-hwkhrBNva4a0bK6pFClvaH0DnIiKkLftJcUU3vkIOcJ0_VbqYeE3IOr-EVRYcrnbmjiJ_0HRUZFc?purpose=fullsize&amp;v=1" alt="https://images.openai.com/static-rsc-3/nsetL_1lFjxts-XUQqekPA30IVAzJR-hwkhrBNva4a0bK6pFClvaH0DnIiKkLftJcUU3vkIOcJ0_VbqYeE3IOr-EVRYcrnbmjiJ_0HRUZFc?purpose=fullsize&amp;v=1" style="aspect-ratio:2.048780487804878;width:733px;height:auto"/></figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">📌 REST API가 뭐길래 이렇게 많이 들릴까?</h2>



<p>요즘 이런 말 많이 들어보셨죠?</p>



<ul class="wp-block-list">
<li>“API 연동”</li>



<li>“REST API 호출”</li>



<li>“서버 API 개발”</li>



<li>“앱에서 API로 데이터 가져오기”</li>
</ul>



<p>그런데 실제로는 생각보다 단순합니다.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">🧠 아주 쉽게 설명해보면</h1>



<p>REST API는</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>📱 앱이나 브라우저가<br>🖥 서버에게 데이터를 요청하고<br>📦 데이터를 받는 약속된 방식</p>
</blockquote>



<p>입니다.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">🍽 식당 비유로 이해하기</h1>



<p>REST API를 식당에 비유해보겠습니다.</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>개념</th><th>비유</th></tr></thead><tbody><tr><td>클라이언트</td><td>손님</td></tr><tr><td>서버</td><td>주방</td></tr><tr><td>요청(Request)</td><td>주문</td></tr><tr><td>응답(Response)</td><td>음식</td></tr><tr><td>API</td><td>주문서</td></tr></tbody></table></figure>



<p>손님이 “김치찌개 주세요”라고 말하면<br>주방이 김치찌개를 만들어 줍니다.</p>



<p>이게 바로 요청 → 응답 구조입니다.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">🔹 REST는 무엇의 약자?</h1>



<p>REST = Representational State Transfer</p>



<p>어렵게 들리지만 실제로는</p>



<p>👉 “HTTP를 이용해서 자원을 다루는 방식”</p>



<p>입니다.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">📦 자원(Resource)이란?</h1>



<p>REST에서 가장 중요한 개념은 “자원”입니다.</p>



<p>예시:</p>



<pre class="wp-block-code"><code>/users
/posts
/products
/orders
</code></pre>



<p>이게 바로 자원입니다.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">🔥 REST의 4가지 핵심 동작</h1>



<p>REST는 HTTP 메서드를 사용합니다.</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>동작</th><th>의미</th><th>예시</th></tr></thead><tbody><tr><td>GET</td><td>조회</td><td>글 목록 보기</td></tr><tr><td>POST</td><td>생성</td><td>글 작성</td></tr><tr><td>PUT</td><td>수정</td><td>글 수정</td></tr><tr><td>DELETE</td><td>삭제</td><td>글 삭제</td></tr></tbody></table></figure>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">예시로 이해하기</h2>



<h3 class="wp-block-heading">1️⃣ 게시글 목록 가져오기</h3>



<pre class="wp-block-code"><code>GET https://example.com/posts
</code></pre>



<p>→ 게시글 목록 반환</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">2️⃣ 게시글 작성</h3>



<pre class="wp-block-code"><code>POST https://example.com/posts
</code></pre>



<p>→ 새 글 생성</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">3️⃣ 게시글 수정</h3>



<pre class="wp-block-code"><code>PUT https://example.com/posts/1
</code></pre>



<p>→ 1번 글 수정</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">4️⃣ 게시글 삭제</h3>



<pre class="wp-block-code"><code>DELETE https://example.com/posts/1
</code></pre>



<p>→ 1번 글 삭제</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">📦 데이터는 어떻게 오고 갈까?</h1>



<p>대부분 <strong>JSON 형식</strong>으로 주고받습니다.</p>



<p>예시 응답:</p>



<pre class="wp-block-code"><code>{
  "id": 1,
  "title": "REST API 쉽게 이해하기",
  "author": "howinfo"
}
</code></pre>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">🔁 전체 흐름 정리</h1>



<pre class="wp-block-code"><code>앱/브라우저
    ↓ 요청 (GET/POST 등)
서버
    ↓ JSON 응답
앱/브라우저 화면 표시
</code></pre>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">💡 REST API의 장점</h1>



<p>✔ 단순함<br>✔ 표준 HTTP 사용<br>✔ 웹과 잘 맞음<br>✔ 확장성 좋음</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">❓ 자주 하는 질문</h1>



<h3 class="wp-block-heading">Q1. REST API와 일반 웹사이트의 차이는?</h3>



<p>웹사이트는 HTML을 반환합니다.<br>REST API는 **데이터(JSON)**만 반환합니다.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">Q2. REST API는 앱에서만 쓰나요?</h3>



<p>아니요.</p>



<ul class="wp-block-list">
<li>웹사이트</li>



<li>모바일 앱</li>



<li>서버 간 통신</li>



<li>IoT 장비</li>
</ul>



<p>모두 사용합니다.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">Q3. POST와 PUT 차이는?</h3>



<p>POST는 “새로 생성”<br>PUT은 “이미 있는 것 수정”</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">🎯 실제 사용 예</h1>



<ul class="wp-block-list">
<li>블로그 글 목록 불러오기</li>



<li>로그인 처리</li>



<li>결제 정보 전송</li>



<li>날씨 정보 가져오기</li>



<li>AI API 호출</li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">📌 핵심 한 줄 정리</h1>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>REST API는<br>“HTTP를 이용해 서버와 데이터를 주고받는 표준 방식”입니다.</p>
</blockquote>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">📋 초보자 체크리스트</h1>



<p>✔ GET은 조회<br>✔ POST는 생성<br>✔ PUT은 수정<br>✔ DELETE는 삭제<br>✔ 데이터는 JSON으로 주고받음</p>



<p></p>
<p>게시물 <a href="https://howinfo.kr/rest-api-%ec%89%bd%ea%b2%8c-%ec%9d%b4%ed%95%b4%ed%95%98%ea%b8%b0/">REST API 쉽게 이해하기</a>이 <a href="https://howinfo.kr">하우인포-IT·테크</a>에 처음 등장했습니다.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://howinfo.kr/rest-api-%ec%89%bd%ea%b2%8c-%ec%9d%b4%ed%95%b4%ed%95%98%ea%b8%b0/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
