Using API very import on Fort end .
URL :
Uniform Resource Locator,也就是「統一資源定位器」
The API Tool almost have support Document of Guide User on Websit , How to direct ( point ) Tool API . Use “ URL serial ’
URL serial :
'Https:// Randomuser.me/api/'
Always put set on main.js :
Before writeen API path in main.js , need first install plug in index.html
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
PATH :
as like your local File address , could be call “ Path “
API path , same !
Just connet to there server of Path .
For Example :
JSON :
After Their Path of ( Data & Paramate )
When you src =
https:///XXXXXXXXX.com / api / ? results = 3 & phone = 0916200XX8
Traslat for Reader :
results = 3 // I wanna get results for 3 //我要三個結果& // and // 和 Phone=0916200XX8 // I wanna get Phone in result //電話號碼
Use different Parameter conbin , could be target what you wanna !
使用PATH 得到的JSON檔前, 可以放到瀏覽器測試, 能確認路徑path 能get 到資料檔案.
成功 Axios GET : JSON 檔案 , ( 排序上很亂 )
在chrome 瀏覽器上安裝插件 : JSON Formatter 將可以把檔案整理好
Ajax :
Asynchronous JavaScript and XML 的縮寫
Asynchronous:非同步請求:
(Asynchronous request):
When client to serve have sent request , NO necessary Page Render ALL Finshed .
Allow Each samll port of the process Also could be Deal others thing /.
Even Sent Others Request !
When Responese cellback to each port of process , also contain Page or applience .
DOCUMENT :
Convience of API of Guide refrence in Websit of Document page .