Actually you should setup the header Access-Control-Allow-Origin
in mocky.io.
Just click on "Switch to Advanced mode" and you will see a "custom headers" input. Add Access-Control-Allow-Origin
and put *
as its value. Then create your mocky.io url. It should work now.