I am just trying to use mocky.io
from my http://localhost:8080
But getting this error:
XMLHttpRequest cannot load http:/
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.
It is looks like you are trying to access to other domain. Maybe add this in the web.config?
<httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="http://localhost" /> </customHeaders> </httpProtocol>