fablabbcn / smartcitizen-kit-20

Smart Citizen Kit 2.0 hardware and firmware
https://smartcitizen.me
GNU General Public License v3.0
37 stars 9 forks source link

WebApp: (Low priority) Maybe replace xmlhttprequest with the Fetch API? #3

Open viktorsmari opened 6 years ago

viktorsmari commented 6 years ago

We are using xmlhttprequest to talk to our kit API: https://github.com/fablabbcn/smartcitizen-kit-20/blob/master/esp/data/main.js#L110-L128

Maybe there are some benefits of using the also built-in Fetch API instead of xmlHttp?

See pros vs cons here: https://stackoverflow.com/questions/35549547/what-is-the-difference-between-the-fetch-api-and-xmlhttprequest