Advertisement
Guest User

Untitled

a guest
Oct 13th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. SCRIPT7002: XMLHttpRequest: Network Error 0x2efd, Could not complete the operation due to error 00002efd.
  2. File: index.html
  3.  
  4. app.controller('searchStockController', function ($scope, $translate,
  5. $location, $window, $log, $http) {
  6.  
  7. $log.info("[searchStockController] Initializing");
  8.  
  9. //Define user password
  10. var userandpass = "user:password";
  11.  
  12. //Encode String
  13. var encodedString = btoa(userandpass);
  14.  
  15. $http({
  16. method: 'GET',
  17. url: "http://172.20.0.53:8000/sap/opu/odata/SAP/ZESGW_LOGIN_USER_SRV/DelegadoUserSet(Usuario='delegado',Password='password_delegado')",
  18. headers: {
  19. 'Authorization': 'Basic ' + encodedString,
  20. 'Accept': 'application/json'
  21. }
  22. })
  23. .success(function(data, status){
  24. console.log("Success.");
  25. })
  26. .error(function (err) {
  27. console.log("Error: " + err);
  28. })
  29.  
  30. <body>
  31. <div ng-app="app">
  32. <!-- Aquí se inyectan las diferentes vistas de la app -->
  33. <div ng-view></div>
  34. </div>
  35. </body>
  36.  
  37. <Capabilities>
  38. <Capability Name="privateNetworkClientServer" />
  39. <Capability Name="internetClientServer" />
  40. <Capability Name="enterpriseAuthentication" />
  41. </Capabilities>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement