ovh-angular-http
Simple http provider for OVH API.
Installation
Bower
$ bower install ovh-angular-http --save
NPM
$ npm install ovh-angular-http --save
Get the sources
$ git clone https://github.com/ovh-ux/ovh-angular-http.git$ cd ovh-angular-http$ npm install$ bower install
Configuration
Usage
// http request OvhHttp"get" "put" "post" "delete"URL options; promise // get API schema (option only rootPath) OvhHttp; promise // get specifically enum of API schema (option only rootPath) OvhHttp; promise // return window.encodeURIComponent(param); OvhHttp;
Options
options = method: // get post put or delete url: // url of sws or proxypass urlParams: // params of url (replace {*}) data: // data of body for POST and PUT params: // params in URL cache: // cache key (String) clearCache: // (String, String[], boolean) clear cache of this url (boolean) or specifique cache (String or String[]) clearAllCache: // (String, String[], boolean) clear all cache of this cache (boolean) or specifique cache (String or String[]) encodeParams: // Encode params encodeUrlParams: // Encode url params // Override provider conf returnSuccessKey: // (String or empty string) return specific key (first level) (empty for return all) returnErrorKey: // (String or empty string) return specific key (first level) (empty for return all) rootPath: // prefix url (provider conf) clearCacheVerb: // table of [PUT POST DELETE]. remove automatically cache of url if method is in table(provider conf)
Example
this { return OvhHttp; }; this { return OvhHttp; };
You've developed a new cool feature? Fixed an annoying bug? We'd be happy to hear from you!
Have a look in CONTRIBUTING.md
Related links
- Contribute: https://github.com/ovh-ux/ovh-angular-http/blob/master/CONTRIBUTING.md
- Report bugs: https://github.com/ovh-ux/ovh-angular-http/issues
- Get latest version: https://github.com/ovh-ux/ovh-angular-http
License
See https://github.com/ovh-ux/ovh-angular-http/blob/master/LICENSE