Sample code


Ref: Fetch API   XHR vs fetch