-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparams.json
More file actions
1 lines (1 loc) · 4.87 KB
/
params.json
File metadata and controls
1 lines (1 loc) · 4.87 KB
1
{"name":"angular-hu","tagline":"Angular $http utilities to deal with backends","body":"# Angular HTTP Utils [](https://travis-ci.org/angular-hu/angular-hu) [](https://coveralls.io/r/angular-hu/angular-hu)\r\nAngular $http utilities to deal with common problems when accessing backends\r\n\r\n## Use cases\r\n\r\nYou want to...\r\n\r\n* [httpu.caches](http://angular-hu.github.io/bower-caches/): Save caches to localstorage to allow returning users to read from them; limit the amount of data stored instead of the number of requests; entries to expire after some time; compress the data to allow more request to be cached in the 5MB storage that the browsers are giving; resize your caches with new options for returning visitors.\r\n* [httpu.composite](http://angular-hu.github.io/bower-composite/): Your app access several Backends, and have some backend specific interceptors (Authorization, error management...) for each one; You have interceptors that implements some plug&play feature, and belongs to a certain module; You download your templates from your server, and query a different API backend using several interceptors\r\n* [httpu.urlbuilder](http://angular-hu.github.io/bower-urlbuilder/): You have a backend that doesn't understand the current param serialization from angular, and you have to code the serialized url directly in the url used for the request, losing the power of having it as a plain object.\r\n* [httpu.headers](http://angular-hu.github.io/bower-headers/): Know the final URL used for your request (this may be computed by $http before leaving to $httpBackend) to delete cache entries, log them...; Wanna collect statistics information for your backend responses accessed over the worldwide clients.\r\n* [httpu.cacherp](http://angular-hu.github.io/bower-cacherp/): You have a backend that need variable request parameters, like oauth1 backends, and wanna cache those requests.\r\n* [httpu.oauth1](http://angular-hu.github.io/bower-oauth1/): You have one or severals backends that need oauth1 signed request, with different configurations.\r\n* [httpu.retry](http://angular-hu.github.io/bower-retry/): You have several retry strategies based on some backend specific errors.\r\n\r\n## Install\r\n\r\nYou can get it from [Bower](http://bower.io/)\r\n\r\n```sh\r\n## add --save to every command to save to your bower.json\r\n# Install specific module\r\nbower install angular-hu-cacherp\r\nbower install angular-hu-retry\r\nbower install angular-hu-oauth1\r\nbower install angular-hu-headers\r\nbower install angular-hu-caches\r\nbower install angular-hu-composite\r\nbower install angular-hu-urlbuilder\r\n```\r\n\r\n## Usage\r\n\r\nAfter installing, HTTP Utils files will be available into a `bower_components` folder, along with its dependencies.\r\n\r\n```html\r\n<script type=\"text/javascript\" src=\"bower_components/angular/angular.js\"></script>\r\n<!-- add your specific module -->\r\n<script type=\"text/javascript\" src=\"bower_components/angular-hu-cacherp/cacherp.js\"></script>\r\n<script type=\"text/javascript\" src=\"bower_components/angular-hu-retry/retry.js\"></script>\r\n<script type=\"text/javascript\" src=\"bower_components/angular-hu-headers/headers.js\"></script>\r\n<script type=\"text/javascript\" src=\"bower_components/angular-hu-urlbuilder/urlbuilder.js\"></script>\r\n<script type=\"text/javascript\" src=\"bower_components/angular-hu-composite/composite.js\"></script>\r\n\r\n<!-- oauth1 has an external dependency -->\r\n<script type=\"text/javascript\" src=\"bower_components/oauth-signature-js/dist/oauth-signature.js\"></script>\r\n<script type=\"text/javascript\" src=\"bower_components/angular-hu-oauth1/oauth1.js\"></script>\r\n\r\n<!-- caches has an external dependency -->\r\n<script type=\"text/javascript\" src=\"bower_components/lru-cache/lib/lru-cache.js\"></script>\r\n<script type=\"text/javascript\" src=\"bower_components/angular-hu-caches/caches.js\"></script>\r\n<!-- ... -->\r\n```\r\n\r\nAdd the specific modules to your dependencies, or add the entire lib by depending on `httpu`\r\n\r\n```javascript\r\nangular.module('myApp', ['httpu.caches', 'httpu.retry', 'httpu.oauth1', ...]);\r\n```\r\n\r\nEach one is now it's own module and will have a relevant README.md in their respective folders\r\n\r\n## Development\r\n\r\n#### Single test\r\n```sh\r\nnpm run test\r\n```\r\n\r\n#### Continuous testing\r\nWill execute karma and watch the files to run the test on every save\r\n\r\n```sh\r\nnpm run watch\r\n```\r\n\r\n#### Code coverage\r\n```sh\r\nnpm run coverage\r\n```\r\n\r\n#### Coding guidelines\r\n```sh\r\nnpm run lint\r\n```\r\n\r\n## LICENSE\r\n\r\nThe MIT License ([MIT](LICENSE))\r\n\r\nCopyright (c) 2015 Telefónica I+D - http://www.tid.es\r\n","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}