I am experiencing an issue with the $http service.
I have an php-server on an other localhost ip-address which serves as REST-API.
I tried this connection with some $http.get()
requests and everything worked fine, but it seems like something is blocking my delete
or put
requests. I tried to configure my http-requests with the $httpProvider
$httpProvider.defaults.useXDomain = true;
delete $httpProvider.defaults.headers.common['X-Requested-With'];
But this didn't worked either. I read that this is in most cases a server-issue but I had no problems to connect to the server using postman.
The Warning I get in the firefox-console is:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8000/testUrl (Reason: CORS preflight channel did not succeed).
I didn't found any similar issues through google for the newest version of angular. It might be possible that the usage of $httpProvider
is deprecated since 1.2.
Kind regards,
Deleadon