your server should enable the cross origin requests, not the client. To do this, you can check this nice page with implementations and configurations for multiple platforms
your server should enable the cross origin requests, not the client. To do this, you can check this nice page with implementations and configurations for multiple platforms