全名:Application Programming Interface
端點(Endpoints)
網址(get/products)
請求(Requests)
Method:Get Post ...
Path:/products
Query Parameters: ?q=abc&g=123
Request Body:
回應(Responses)
Status Code: 200
Reponse Body :[{...}]
2.API制定
通常由後端制定 postman 如無介面可用來測試 資料內容 METHOD:GET/POST/PUT/Delete 來源:url 內容: 格式:JSON3.API KEY (金鑰)/ Token (令牌)
認證機制 1.放在網址上 2.放在request headers裡面4.API種類
1.無須註冊申請 (練習、政府公開資料) 2.需申請帳號 (Google Map apk key) 3.只能從後端伺服器讀取 (在官網可以看、不能跨網域CORS) 4.需申請後端取得資料 cache-control response headers Access-Control-Allow-Origin參考來源
六角學院直播課
