{"id":39079,"date":"2024-11-02T02:36:50","date_gmt":"2024-11-02T02:36:50","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=39079"},"modified":"2024-11-26T06:42:30","modified_gmt":"2024-11-26T06:42:30","slug":"api%ec%99%80-%ec%84%9c%eb%b2%84%ec%99%80%ec%9d%98-%ed%86%b5%ec%8b%a0-json-%ec%84%9c%eb%b2%84%eb%82%98-mock-api%eb%a1%9c-%eb%8d%b0%ec%9d%b4%ed%84%b0-%ec%97%b0%eb%8f%99","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/39079\/","title":{"rendered":"API\uc640 \uc11c\ubc84\uc640\uc758 \ud1b5\uc2e0, JSON \uc11c\ubc84\ub098 Mock API\ub85c \ub370\uc774\ud130 \uc5f0\ub3d9"},"content":{"rendered":"<p><body><\/p>\n<p>\n        \ud604\ub300 \uc6f9 \uac1c\ubc1c\uc5d0\uc11c \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 \uc11c\ubc84 \uac04\uc758 \ud1b5\uc2e0\uc740 \ub9e4\uc6b0 \uc911\uc694\ud55c \ubd80\ubd84\uc785\ub2c8\ub2e4. \ud2b9\ud788, \ub9ac\uc561\ud2b8(React)\uc640 \uac19\uc740 \ud504\ub860\ud2b8\uc5d4\ub4dc \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud560 \ub54c, API\ub97c \ud1b5\ud55c \ub370\uc774\ud130 \uc694\uccad\uacfc \ucc98\ub9ac\ub294 \ub9e4\uc6b0 \uc77c\ubc18\uc801\uc778 \uc791\uc5c5\uc774 \ub429\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 \ub9ac\uc561\ud2b8\ub97c \uc0ac\uc6a9\ud558\uc5ec JSON \uc11c\ubc84\ub098 Mock API\uc640 \ud1b5\uc2e0\ud558\ub294 \ubc29\ubc95\uc744 \uae4a\uc774 \uc788\uac8c \ub2e4\ub8e8\uaca0\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<h2>1. API\ub780 \ubb34\uc5c7\uc778\uac00?<\/h2>\n<p>\n        API(\uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 \ud504\ub85c\uadf8\ub798\ubc0d \uc778\ud130\ud398\uc774\uc2a4, Application Programming Interface)\ub294 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 \uac04\uc758 \ud1b5\uc2e0\uc744 \uc704\ud55c \uc778\ud130\ud398\uc774\uc2a4\uc785\ub2c8\ub2e4. API\ub97c \ud1b5\ud574 \uc11c\ub85c \ub2e4\ub978 \uc2dc\uc2a4\ud15c\uc774 \ub370\uc774\ud130\ub97c \uc8fc\uace0\ubc1b\uac70\ub098 \uae30\ub2a5\uc744 \ud638\ucd9c\ud558\uc5ec \uc0c1\ud638\uc791\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc6f9\uc5d0\uc11c \uc0ac\uc6a9\ud558\ub294 API\ub294 \uc77c\ubc18\uc801\uc73c\ub85c REST(Representational State Transfer) \ubc29\uc2dd \ub610\ub294 GraphQL \ubc29\uc2dd\uc73c\ub85c \uc0dd\uc131\ub429\ub2c8\ub2e4.\n    <\/p>\n<h2>2. JSON \uc11c\ubc84\ub780?<\/h2>\n<p>\n        JSON \uc11c\ubc84\ub294 REST API\ub97c \uc27d\uac8c \uc0dd\uc131\ud560 \uc218 \uc788\ub3c4\ub85d \ub3c4\uc640\uc8fc\ub294 \ub3c4\uad6c\uc785\ub2c8\ub2e4. \ub2e8\uc21c\ud55c JSON \ud30c\uc77c\uc744 \uae30\ubc18\uc73c\ub85c RESTful API\ub97c \uc81c\uacf5\ud558\uba70, \ub370\uc774\ud130\ub97c CRUD(Create, Read, Update, Delete) \ubc29\uc2dd\uc73c\ub85c \uad00\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 \ud504\ub860\ud2b8\uc5d4\ub4dc \uac1c\ubc1c\uc790\ub294 \uc27d\uac8c API\uc640 \uc0c1\ud638\uc791\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<h3>2.1 JSON \uc11c\ubc84 \uc124\uce58\ud558\uae30<\/h3>\n<p>\n        JSON \uc11c\ubc84\ub294 Node.js\uc5d0\uc11c \uc2e4\ud589\ub418\ubbc0\ub85c, \uba3c\uc800 Node.js\uac00 \uc124\uce58\ub418\uc5b4 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4. \uadf8 \ud6c4 \ub2e4\uc74c \uba85\ub839\uc5b4\ub97c \ud1b5\ud574 JSON \uc11c\ubc84\ub97c \uc124\uce58\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4:\n    <\/p>\n<pre><code>npm install -g json-server<\/code><\/pre>\n<h3>2.2 JSON \ud30c\uc77c \ub9cc\ub4e4\uae30<\/h3>\n<p>\n        \uc544\ub798\uc640 \uac19\uc740 \ud615\uc2dd\uc758 <code>db.json<\/code> \ud30c\uc77c\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4. \uc774 \ud30c\uc77c\uc740 API\uc5d0\uc11c \uc0ac\uc6a9\ud560 \ub370\uc774\ud130\uc758 \uc800\uc7a5\uc18c \uc5ed\ud560\uc744 \ud569\ub2c8\ub2e4.\n    <\/p>\n<pre><code>{\n        \"posts\": [\n            { \"id\": 1, \"title\": \"\uccab \ubc88\uc9f8 \ud3ec\uc2a4\ud2b8\", \"author\": \"\ud64d\uae38\ub3d9\" },\n            { \"id\": 2, \"title\": \"\ub450 \ubc88\uc9f8 \ud3ec\uc2a4\ud2b8\", \"author\": \"\uae40\uc218\ube48\" }\n        ],\n        \"comments\": [\n            { \"id\": 1, \"postId\": 1, \"body\": \"\uc548\ub155\ud558\uc138\uc694!\" },\n            { \"id\": 2, \"postId\": 2, \"body\": \"\uc88b\uc740 \ud558\ub8e8 \ub418\uc138\uc694!\" }\n        ]\n    }<\/code><\/pre>\n<h3>2.3 JSON \uc11c\ubc84 \uc2e4\ud589\ud558\uae30<\/h3>\n<p>\n        JSON \uc11c\ubc84\ub97c \uc2e4\ud589\ud558\ub824\uba74 \ub2e4\uc74c \uba85\ub839\uc5b4\ub97c \uc785\ub825\ud569\ub2c8\ub2e4:\n    <\/p>\n<pre><code>json-server --watch db.json<\/code><\/pre>\n<p>\n        \uc774 \uba85\ub839\uc5b4\ub97c \ud1b5\ud574 \ub85c\uceec \uc11c\ubc84\uac00 \uc2dc\uc791\ub418\uba70, \uae30\ubcf8\uc801\uc73c\ub85c <code>http:\/\/localhost:3000<\/code>\uc5d0\uc11c API\uc5d0 \uc811\uadfc\ud560 \uc218 \uc788\uac8c \ub429\ub2c8\ub2e4.\n    <\/p>\n<h2>3. \ub9ac\uc561\ud2b8\uc5d0\uc11c API\uc5d0 fetch\ud558\uae30<\/h2>\n<p>\n        \uc774\uc81c JSON \uc11c\ubc84\uac00 \uc2e4\ud589 \uc911\uc774\ubbc0\ub85c, \ub9ac\uc561\ud2b8 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c API\uc640 \ud1b5\uc2e0\ud558\ub294 \ubc29\ubc95\uc744 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \ub9ac\uc561\ud2b8 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c \ub370\uc774\ud130\ub97c \uac00\uc838\uc624\uae30 \uc704\ud574 <code>fetch<\/code> API\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<h3>3.1 \ub9ac\uc561\ud2b8 \ucef4\ud3ec\ub10c\ud2b8 \uc0dd\uc131\ud558\uae30<\/h3>\n<p>\n        \uc544\ub798\ub294 API\ub85c\ubd80\ud130 \ub370\uc774\ud130\ub97c \ubc1b\uc544\uc640\uc11c \ud45c\uc2dc\ud558\ub294 \uac04\ub2e8\ud55c \ub9ac\uc561\ud2b8 \ucef4\ud3ec\ub10c\ud2b8\uc785\ub2c8\ub2e4:\n    <\/p>\n<pre><code>import React, { useEffect, useState } from 'react';\n\n    const Posts = () =&gt; {\n        const [posts, setPosts] = useState([]);\n        const [loading, setLoading] = useState(true);\n\n        useEffect(() =&gt; {\n            fetch('http:\/\/localhost:3000\/posts')\n                .then(response =&gt; response.json())\n                .then(data =&gt; {\n                    setPosts(data);\n                    setLoading(false);\n                })\n                .catch(error =&gt; console.error('API \ud638\ucd9c \uc911 \uc624\ub958 \ubc1c\uc0dd:', error));\n        }, []);\n\n        if (loading) {\n            return <div>\ub85c\ub529 \uc911...<\/div>;\n        }\n\n        return (\n            <div>\n                <h2>\uac8c\uc2dc\uae00 \ubaa9\ub85d<\/h2>\n                <ul>\n                    {posts.map(post =&gt; (\n                        <li key=\"{post.id}\">{post.title} - {post.author}<\/li>\n                    ))}\n                <\/ul>\n            <\/div>\n        );\n    };\n\n    export default Posts;<\/code><\/pre>\n<h3>3.2 \uc124\uba85<\/h3>\n<p>\n        \uc704\uc758 \ucef4\ud3ec\ub10c\ud2b8\ub294 <code>useEffect<\/code> \ud6c5\uc744 \uc0ac\uc6a9\ud558\uc5ec \ucef4\ud3ec\ub10c\ud2b8\uac00 \ub9c8\uc6b4\ud2b8\ub420 \ub54c API\ub97c \ud638\ucd9c\ud569\ub2c8\ub2e4. <code>fetch<\/code> \ud568\uc218\ub97c \uc0ac\uc6a9\ud558\uc5ec <code>http:\/\/localhost:3000\/posts<\/code> URL\uc5d0\uc11c \ub370\uc774\ud130\ub97c \uac00\uc838\uc624\uace0, \ubc1b\uc740 \ub370\uc774\ud130\ub294 <code>setPosts<\/code>\ub97c \ud1b5\ud574 \uc0c1\ud0dc\uc5d0 \uc800\uc7a5\ud569\ub2c8\ub2e4. \ub85c\ub529 \uc0c1\ud0dc\ub294 <code>loading<\/code> \ubcc0\uc218\ub97c \ud1b5\ud574 \uad00\ub9ac\ub418\uba70, \ub370\uc774\ud130\uac00 \ub85c\ub529 \uc911\uc77c \ub54c \ub85c\ub529 \uba54\uc2dc\uc9c0\ub97c \ubcf4\uc5ec\uc8fc\uace0, \ub370\uc774\ud130\uac00 \ubaa8\ub450 \ub85c\ub4dc\ub418\uba74 \ub9ac\uc2a4\ud2b8\ub97c \ucd9c\ub825\ud569\ub2c8\ub2e4.\n    <\/p>\n<h2>4. Mock API \uc0ac\uc6a9\ud558\uae30<\/h2>\n<p>\n        \uc2e4\uc81c API\ub97c \uc0ac\uc6a9\ud558\uae30 \uc804\uc5d0 Mock API\ub97c \uc0ac\uc6a9\ud558\ub294 \uac83\uc740 \ub9e4\uc6b0 \uc720\uc6a9\ud569\ub2c8\ub2e4. Mock API\ub294 \uc2e4\uc81c \uc11c\ubc84\uc640 \uc720\uc0ac\ud55c \ubc29\uc2dd\uc73c\ub85c \uc791\ub3d9\ud558\uc9c0\ub9cc, \uc989\uc2dc \uad6c\ud604\ud560 \uc218 \uc788\ub294 APIs\uc785\ub2c8\ub2e4. Postman, Mocky, MirageJS\uc640 \uac19\uc740 \ub3c4\uad6c\uac00 \uc788\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<h3>4.1 MirageJS \uc608\uc81c<\/h3>\n<p>\n        MirageJS\ub294 \ud504\ub860\ud2b8\uc5d4\ub4dc \uac1c\ubc1c\uc790\ub4e4\uc774 \ud14c\uc2a4\ud2b8\uc640 \uac1c\ubc1c\uc744 \uc704\ud55c API\ub97c \uc124\uc815\ud558\ub294 \ub370 \uc720\uc6a9\ud569\ub2c8\ub2e4. Mirage\ub97c \uc0ac\uc6a9\ud558\uc5ec API\ub97c \uc124\uc815\ud558\ub294 \ubc29\ubc95\uc744 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<pre><code>import { createServer } from 'miragejs';\n\n    createServer({\n        routes() {\n            this.namespace = 'api';\n\n            this.get('\/posts', () =&gt; {\n                return [\n                    { id: 1, title: \"Mock API \uac8c\uc2dc\uae00 1\", author: \"\uc774\uc21c\uc2e0\" },\n                    { id: 2, title: \"Mock API \uac8c\uc2dc\uae00 2\", author: \"\ubc15\uc9c0\uc131\" }\n                ];\n            });\n        }\n    });<\/code><\/pre>\n<p>\n        \uc704 \ucf54\ub4dc\ub97c \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc758 \uc5d4\ud2b8\ub9ac \ud30c\uc77c\uc5d0 \ucd94\uac00\ud558\uba74, MirageJS\uac00 \uc124\uc815\ud55c Mock API\uac00 <code>http:\/\/localhost:3000\/api\/posts<\/code> \uacbd\ub85c\uc5d0\uc11c \uc694\uccad\uc744 \ubc1b\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\uc81c \uc774\uc804\uc5d0 \uc791\uc131\ud55c <code>Posts<\/code> \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c URL\uc744 \ubcc0\uacbd\ud574\uc8fc\uba74 Mock API\uc640 \ud1b5\uc2e0\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<h3>4.2 \uc2e4\uc81c \uc608\uc81c\uc640\uc758 \ube44\uad50<\/h3>\n<p>\n        MirageJS\uc640 \uac19\uc740 Mock API \uae30\uc220\uc744 \uc0ac\uc6a9\ud558\uba74, \uc11c\ubc84\uac00 \uc900\ube44\ub418\uc9c0 \uc54a\uc558\ub354\ub77c\ub3c4 \ud14c\uc2a4\ud2b8\ub97c \ud560 \uc218 \uc788\ub2e4\ub294 \uc7a5\uc810\uc774 \uc788\uc2b5\ub2c8\ub2e4. \ub610\ud55c, Mock API\ub97c \uc0ac\uc6a9\ud558\uba74 \uc0c1\ud638\uc791\uc6a9\uacfc \uc0c1\ud0dc \uad00\ub9ac\ub97c \ub354 \uc720\uc5f0\ud558\uac8c \ucc98\ub9ac\ud560 \uc218 \uc788\uc5b4 \ud504\ub860\ud2b8\uc5d4\ub4dc \uac1c\ubc1c \uc18d\ub3c4\ub97c \ub192\uc77c \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<h2>5. \ub370\uc774\ud130 \uc5c5\ub370\uc774\ud2b8\uc640 \uc0ad\uc81c<\/h2>\n<p>\n        CRUD \uc791\uc5c5\uc740 API\uc5d0\uc11c\uc758 \uae30\ubcf8\uc801\uc778 \ub370\uc774\ud130 \ucc98\ub9ac \ubc29\uc2dd\uc785\ub2c8\ub2e4. \uc55e\uc5d0\uc11c \uc791\uc131\ud55c \ub9ac\uc561\ud2b8 \ucef4\ud3ec\ub10c\ud2b8\uc5d0\uc11c \ub370\uc774\ud130\ub97c \uc5c5\ub370\uc774\ud2b8\ud558\uace0 \uc0ad\uc81c\ud558\ub294 \ubc29\ubc95\uc744 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<h3>5.1 \ub370\uc774\ud130 \uc5c5\ub370\uc774\ud2b8<\/h3>\n<p>\n        \uc544\ub798\uc758 \ucf54\ub4dc\ub294 \ud2b9\uc815 \uac8c\uc2dc\uae00\uc744 \uc5c5\ub370\uc774\ud2b8\ud558\ub294 \ubc29\ubc95\uc744 \ubcf4\uc5ec\uc90d\ub2c8\ub2e4. <code>fetch<\/code> \ud568\uc218\uc5d0\uc11c <code>PUT<\/code> \uc694\uccad\uc744 \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130 \uc5c5\ub370\uc774\ud2b8 \uc791\uc5c5\uc744 \uc218\ud589\ud569\ub2c8\ub2e4.\n    <\/p>\n<pre><code>const updatePost = (postId, updatedContent) =&gt; {\n        fetch(`http:\/\/localhost:3000\/posts\/${postId}`, {\n            method: 'PUT',\n            headers: {\n                'Content-Type': 'application\/json'\n            },\n            body: JSON.stringify(updatedContent)\n        })\n        .then(response =&gt; response.json())\n        .then(updatedPost =&gt; {\n            \/\/ \uc0c1\ud0dc \uc5c5\ub370\uc774\ud2b8 \ub85c\uc9c1\n        })\n        .catch(error =&gt; console.error('\uac8c\uc2dc\uae00 \uc5c5\ub370\uc774\ud2b8 \uc624\ub958:', error));\n    };<\/code><\/pre>\n<h3>5.2 \ub370\uc774\ud130 \uc0ad\uc81c<\/h3>\n<p>\n        \uc0ad\uc81c \uc791\uc5c5\uc740 <code>DELETE<\/code> \uba54\uc18c\ub4dc\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc218\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc544\ub798\ub294 \ud2b9\uc815 \uac8c\uc2dc\uae00\uc744 \uc0ad\uc81c\ud558\ub294 \uc608\uc2dc\uc785\ub2c8\ub2e4:\n    <\/p>\n<pre><code>const deletePost = (postId) =&gt; {\n        fetch(`http:\/\/localhost:3000\/posts\/${postId}`, {\n            method: 'DELETE'\n        })\n        .then(() =&gt; {\n            \/\/ \uc0c1\ud0dc \uc5c5\ub370\uc774\ud2b8 \ub85c\uc9c1\n        })\n        .catch(error =&gt; console.error('\uac8c\uc2dc\uae00 \uc0ad\uc81c \uc624\ub958:', error));\n    };<\/code><\/pre>\n<h2>6. \uacb0\ub860<\/h2>\n<p>\n        \ub9ac\uc561\ud2b8\uc5d0\uc11c API\uc640\uc758 \ud1b5\uc2e0\uc744 \ud1b5\ud574 \ub2e4\uc591\ud55c \ub370\uc774\ud130\ub97c \ucc98\ub9ac\ud558\ub294 \ubc29\ubc95\uc744 \uc54c\uc544\ubcf4\uc558\uc2b5\ub2c8\ub2e4. JSON \uc11c\ubc84\uc640 \uac19\uc740 \uc9c4\uc785 \uc7a5\ubcbd\uc774 \ub0ae\uc740 \ub3c4\uad6c\ub97c \uc0ac\uc6a9\ud558\uba74 \uac1c\ubc1c \ucd08\uae30 \ub2e8\uacc4\uc5d0\uc11c \ube60\ub974\uac8c \ud504\ub85c\ud1a0\ud0c0\uc785\uc744 \uc0dd\uc131\ud560 \uc218 \uc788\uc73c\uba70, Mock API\ub97c \ud1b5\ud574 \uc2e4\uc81c API\uac00 \uac1c\ubc1c\ub418\uae30 \uc804\uc5d0\ub3c4 \uc720\uc6a9\ud55c \ud14c\uc2a4\ud2b8\ub97c \uc9c4\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub7ec\ud55c \uae30\ubc95\ub4e4\uc740 \ud504\ub860\ud2b8\uc5d4\ub4dc \uac1c\ubc1c\uc758 \ud6a8\uc728\uc131\uc744 \ud06c\uac8c \ud5a5\uc0c1\uc2dc\ud0ac \uac83\uc785\ub2c8\ub2e4.\n    <\/p>\n<h2>\ucd94\uac00 \ud559\uc2b5\uc790\ub8cc<\/h2>\n<ul>\n<li><a href=\"https:\/\/json-server.typicode.com\/\">JSON Server \uacf5\uc2dd \ubb38\uc11c<\/a><\/li>\n<li><a href=\"https:\/\/miragejs.com\/\">MirageJS \uacf5\uc2dd \ubb38\uc11c<\/a><\/li>\n<li><a href=\"https:\/\/developer.mozilla.org\/ko\/docs\/Web\/API\/Fetch_API\">Fetch API \ubb38\uc11c<\/a><\/li>\n<\/ul>\n<p>\n        \uc774 \uae00\uc774 \ub9ac\uc561\ud2b8 \ubc0f API\uc758 \uc774\ud574\uc5d0 \ub3c4\uc6c0\uc774 \ub418\uc5c8\uae30\ub97c \ubc14\ub77c\uba70, \ud5a5\ud6c4 \ub610 \ub2e4\ub978 \uc8fc\uc81c\ub85c \ub354\uc6b1 \uc2ec\ub3c4 \uae4a\uc740 \ub0b4\uc6a9\uc744 \ub2e4\ub8f0 \uc218 \uc788\uae30\ub97c \uae30\ub300\ud569\ub2c8\ub2e4.\n    <\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud604\ub300 \uc6f9 \uac1c\ubc1c\uc5d0\uc11c \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 \uc11c\ubc84 \uac04\uc758 \ud1b5\uc2e0\uc740 \ub9e4\uc6b0 \uc911\uc694\ud55c \ubd80\ubd84\uc785\ub2c8\ub2e4. \ud2b9\ud788, \ub9ac\uc561\ud2b8(React)\uc640 \uac19\uc740 \ud504\ub860\ud2b8\uc5d4\ub4dc \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud560 \ub54c, API\ub97c \ud1b5\ud55c \ub370\uc774\ud130 \uc694\uccad\uacfc \ucc98\ub9ac\ub294 \ub9e4\uc6b0 \uc77c\ubc18\uc801\uc778 \uc791\uc5c5\uc774 \ub429\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 \ub9ac\uc561\ud2b8\ub97c \uc0ac\uc6a9\ud558\uc5ec JSON \uc11c\ubc84\ub098 Mock API\uc640 \ud1b5\uc2e0\ud558\ub294 \ubc29\ubc95\uc744 \uae4a\uc774 \uc788\uac8c \ub2e4\ub8e8\uaca0\uc2b5\ub2c8\ub2e4. 1. API\ub780 \ubb34\uc5c7\uc778\uac00? API(\uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 \ud504\ub85c\uadf8\ub798\ubc0d \uc778\ud130\ud398\uc774\uc2a4, Application Programming Interface)\ub294 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 \uac04\uc758 \ud1b5\uc2e0\uc744 \uc704\ud55c &hellip; <a href=\"https:\/\/atmokpo.com\/w\/39079\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;API\uc640 \uc11c\ubc84\uc640\uc758 \ud1b5\uc2e0, JSON \uc11c\ubc84\ub098 Mock API\ub85c \ub370\uc774\ud130 \uc5f0\ub3d9&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[191],"tags":[],"class_list":["post-39079","post","type-post","status-publish","format-standard","hentry","category-react"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>API\uc640 \uc11c\ubc84\uc640\uc758 \ud1b5\uc2e0, JSON \uc11c\ubc84\ub098 Mock API\ub85c \ub370\uc774\ud130 \uc5f0\ub3d9 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/39079\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"API\uc640 \uc11c\ubc84\uc640\uc758 \ud1b5\uc2e0, JSON \uc11c\ubc84\ub098 Mock API\ub85c \ub370\uc774\ud130 \uc5f0\ub3d9 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\ud604\ub300 \uc6f9 \uac1c\ubc1c\uc5d0\uc11c \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 \uc11c\ubc84 \uac04\uc758 \ud1b5\uc2e0\uc740 \ub9e4\uc6b0 \uc911\uc694\ud55c \ubd80\ubd84\uc785\ub2c8\ub2e4. \ud2b9\ud788, \ub9ac\uc561\ud2b8(React)\uc640 \uac19\uc740 \ud504\ub860\ud2b8\uc5d4\ub4dc \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud560 \ub54c, API\ub97c \ud1b5\ud55c \ub370\uc774\ud130 \uc694\uccad\uacfc \ucc98\ub9ac\ub294 \ub9e4\uc6b0 \uc77c\ubc18\uc801\uc778 \uc791\uc5c5\uc774 \ub429\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 \ub9ac\uc561\ud2b8\ub97c \uc0ac\uc6a9\ud558\uc5ec JSON \uc11c\ubc84\ub098 Mock API\uc640 \ud1b5\uc2e0\ud558\ub294 \ubc29\ubc95\uc744 \uae4a\uc774 \uc788\uac8c \ub2e4\ub8e8\uaca0\uc2b5\ub2c8\ub2e4. 1. API\ub780 \ubb34\uc5c7\uc778\uac00? API(\uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 \ud504\ub85c\uadf8\ub798\ubc0d \uc778\ud130\ud398\uc774\uc2a4, Application Programming Interface)\ub294 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 \uac04\uc758 \ud1b5\uc2e0\uc744 \uc704\ud55c &hellip; \ub354 \ubcf4\uae30 &quot;API\uc640 \uc11c\ubc84\uc640\uc758 \ud1b5\uc2e0, JSON \uc11c\ubc84\ub098 Mock API\ub85c \ub370\uc774\ud130 \uc5f0\ub3d9&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/39079\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-02T02:36:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:42:30+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/39079\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/39079\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"API\uc640 \uc11c\ubc84\uc640\uc758 \ud1b5\uc2e0, JSON \uc11c\ubc84\ub098 Mock API\ub85c \ub370\uc774\ud130 \uc5f0\ub3d9\",\"datePublished\":\"2024-11-02T02:36:50+00:00\",\"dateModified\":\"2024-11-26T06:42:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/39079\/\"},\"wordCount\":94,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"React\ud504\ub860\ud2b8\uc5d4\ub4dc\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/39079\/\",\"url\":\"https:\/\/atmokpo.com\/w\/39079\/\",\"name\":\"API\uc640 \uc11c\ubc84\uc640\uc758 \ud1b5\uc2e0, JSON \uc11c\ubc84\ub098 Mock API\ub85c \ub370\uc774\ud130 \uc5f0\ub3d9 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-02T02:36:50+00:00\",\"dateModified\":\"2024-11-26T06:42:30+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/39079\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/39079\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/39079\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API\uc640 \uc11c\ubc84\uc640\uc758 \ud1b5\uc2e0, JSON \uc11c\ubc84\ub098 Mock API\ub85c \ub370\uc774\ud130 \uc5f0\ub3d9\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"API\uc640 \uc11c\ubc84\uc640\uc758 \ud1b5\uc2e0, JSON \uc11c\ubc84\ub098 Mock API\ub85c \ub370\uc774\ud130 \uc5f0\ub3d9 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/39079\/","og_locale":"ko_KR","og_type":"article","og_title":"API\uc640 \uc11c\ubc84\uc640\uc758 \ud1b5\uc2e0, JSON \uc11c\ubc84\ub098 Mock API\ub85c \ub370\uc774\ud130 \uc5f0\ub3d9 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\ud604\ub300 \uc6f9 \uac1c\ubc1c\uc5d0\uc11c \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 \uc11c\ubc84 \uac04\uc758 \ud1b5\uc2e0\uc740 \ub9e4\uc6b0 \uc911\uc694\ud55c \ubd80\ubd84\uc785\ub2c8\ub2e4. \ud2b9\ud788, \ub9ac\uc561\ud2b8(React)\uc640 \uac19\uc740 \ud504\ub860\ud2b8\uc5d4\ub4dc \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud560 \ub54c, API\ub97c \ud1b5\ud55c \ub370\uc774\ud130 \uc694\uccad\uacfc \ucc98\ub9ac\ub294 \ub9e4\uc6b0 \uc77c\ubc18\uc801\uc778 \uc791\uc5c5\uc774 \ub429\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 \ub9ac\uc561\ud2b8\ub97c \uc0ac\uc6a9\ud558\uc5ec JSON \uc11c\ubc84\ub098 Mock API\uc640 \ud1b5\uc2e0\ud558\ub294 \ubc29\ubc95\uc744 \uae4a\uc774 \uc788\uac8c \ub2e4\ub8e8\uaca0\uc2b5\ub2c8\ub2e4. 1. API\ub780 \ubb34\uc5c7\uc778\uac00? API(\uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 \ud504\ub85c\uadf8\ub798\ubc0d \uc778\ud130\ud398\uc774\uc2a4, Application Programming Interface)\ub294 \uc18c\ud504\ud2b8\uc6e8\uc5b4 \uc751\uc6a9 \ud504\ub85c\uadf8\ub7a8 \uac04\uc758 \ud1b5\uc2e0\uc744 \uc704\ud55c &hellip; \ub354 \ubcf4\uae30 \"API\uc640 \uc11c\ubc84\uc640\uc758 \ud1b5\uc2e0, JSON \uc11c\ubc84\ub098 Mock API\ub85c \ub370\uc774\ud130 \uc5f0\ub3d9\"","og_url":"https:\/\/atmokpo.com\/w\/39079\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-02T02:36:50+00:00","article_modified_time":"2024-11-26T06:42:30+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"1\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/39079\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/39079\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"API\uc640 \uc11c\ubc84\uc640\uc758 \ud1b5\uc2e0, JSON \uc11c\ubc84\ub098 Mock API\ub85c \ub370\uc774\ud130 \uc5f0\ub3d9","datePublished":"2024-11-02T02:36:50+00:00","dateModified":"2024-11-26T06:42:30+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/39079\/"},"wordCount":94,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["React\ud504\ub860\ud2b8\uc5d4\ub4dc"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/39079\/","url":"https:\/\/atmokpo.com\/w\/39079\/","name":"API\uc640 \uc11c\ubc84\uc640\uc758 \ud1b5\uc2e0, JSON \uc11c\ubc84\ub098 Mock API\ub85c \ub370\uc774\ud130 \uc5f0\ub3d9 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-02T02:36:50+00:00","dateModified":"2024-11-26T06:42:30+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/39079\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/39079\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/39079\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"API\uc640 \uc11c\ubc84\uc640\uc758 \ud1b5\uc2e0, JSON \uc11c\ubc84\ub098 Mock API\ub85c \ub370\uc774\ud130 \uc5f0\ub3d9"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/39079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=39079"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/39079\/revisions"}],"predecessor-version":[{"id":39080,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/39079\/revisions\/39080"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=39079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=39079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=39079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}