Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SCRIPT7002: XMLHttpRequest: Network Error 0x2efd, Could not complete the operation due to error 00002efd.
- File: index.html
- app.controller('searchStockController', function ($scope, $translate,
- $location, $window, $log, $http) {
- $log.info("[searchStockController] Initializing");
- //Define user password
- var userandpass = "user:password";
- //Encode String
- var encodedString = btoa(userandpass);
- $http({
- method: 'GET',
- url: "http://172.20.0.53:8000/sap/opu/odata/SAP/ZESGW_LOGIN_USER_SRV/DelegadoUserSet(Usuario='delegado',Password='password_delegado')",
- headers: {
- 'Authorization': 'Basic ' + encodedString,
- 'Accept': 'application/json'
- }
- })
- .success(function(data, status){
- console.log("Success.");
- })
- .error(function (err) {
- console.log("Error: " + err);
- })
- <body>
- <div ng-app="app">
- <!-- Aquí se inyectan las diferentes vistas de la app -->
- <div ng-view></div>
- </div>
- </body>
- <Capabilities>
- <Capability Name="privateNetworkClientServer" />
- <Capability Name="internetClientServer" />
- <Capability Name="enterpriseAuthentication" />
- </Capabilities>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement