# 2021 road map ### <span class="title"> Internet</span> #### 2.how does the Internet work #### 2.what is http ``` http 全名: 超文本傳輸協議 https 全名: 超文本傳輸安全協定 ``` <font color="#00A9A5">client端按下button時,發送request,server端回應response</font> <font color="#00A9A5"></font> #### 3.what is API <font color="#00A9A5"> 簡單來說,今天我到轉運站要搭車到高雄(發出request),櫃台人員告知我要到10號候車處。此時轉運站本體就是Router(路由器),轉運站裡的各家客運公司提供的路線就像API,它控制所有路由並順利完你的搭乘請求(response),將你從台北帶到高雄。</font> > 一般的API(命名主觀,沒有充分利用HTTP METHOD) ``` 得到文章 /api/get_post/ 新增文章 /api/upload_post/ 更新文章 /api/update_post/ 刪除文章 /api/delete_post/ ``` > RESTful API(優雅簡潔的方式,清楚簡短,可讀性高) ``` 得到所有文章 /api/posts/ (GET) 新增文章 /api/posts/ (POST) 更新文章 /api/posts/ (PUT) 刪除文章 /api/posts/ (DELETE) ``` | URL | description | HTTP Method | |:-----------:|:-----------:|:-----------:| | /api/posts/ | 得到所有文章 | GET | | /api/posts/ | 新增文章 | POST | | /api/posts/ | 更新文章 | PUT | | /api/posts/ | 刪除文章 | DELETE | reference: [https://ithelp.ithome.com.tw/articles/10221474](https://) <hr> ### <span class="title"> HTML</span> <style> .title { color: white; background-color:#419098; padding:10px } </style>
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up