SHARE
TWEET

Untitled

a guest Dec 26th, 2014 140 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         .factory('CategoriesService', function ($filter, $http, appConfig, $q) {
  2.  
  3.             var config = {
  4.                 headers: {
  5.                     'Authorization': 'Basic bW9iaWxlLmFwcDoxMzdhNWVhNzkxODcwNTAwNDFkNmZmZTcxM*******',
  6.                 }
  7.             };
  8.  
  9.  
  10.             var url, loadData;
  11.  
  12.             url = appConfig.api.rootUrl + appConfig.api.categories;
  13.  
  14.             loadData = function () {
  15.                 console.log('load Data');
  16.  
  17.                 var defer = $q.defer();
  18.                 $http
  19.                     .get(url, config)
  20.                     .then(function (response) {
  21.                         defer.resolve(response);
  22.                     }, function (error) {
  23.                         defer.reject(error);
  24.                     });
  25.                 return defer.promise;
  26.             };
  27.  
  28.  
  29. =====================
  30.  
  31. Remote Address:**********:80
  32. Request URL:http://**********
  33. Request Method:OPTIONS
  34. Status Code:200 OK
  35. Request Headersview source
  36. Accept:*/*
  37. Accept-Encoding:gzip, deflate, sdch
  38. Accept-Language:ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4
  39. Access-Control-Request-Headers:accept, authorization
  40. Access-Control-Request-Method:GET
  41. Cache-Control:no-cache
  42. Connection:keep-alive
  43. Host:api.fap.mobi
  44. Origin:http://local***
  45. Pragma:no-cache
  46. Referer:http://local***
  47. User-Agent:Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
  48. Response Headersview source
  49. Allow:GET,HEAD,POST,PUT,PATCH,DELETE
  50. Cache-Control:no-cache
  51. Connection:keep-alive
  52. Content-Encoding:gzip
  53. Content-Type:text/html; charset=UTF-8
  54. Date:Fri, 26 Dec 2014 09:54:00 GMT
  55. Server:nginx/1.0.15
  56. Set-Cookie:*** path=/; httponly
  57. Transfer-Encoding:chunked
  58. Vary:Accept-Encoding
  59. X-Powered-By:PHP/5.5.18
  60.  
  61. =====================
  62.  
  63. Remove config:
  64. .get(url)
  65.  
  66. Status Code:401 Unauthorized
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top