Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function handleRequest(method, url, withCredentials, params, options) {
- var req = {
- method: method,
- url: buildUrl(url),
- withCredentials: withCredentials
- }
- if (params) {
- req['params'] = params
- }
- if (options) {
- options.forEach(function(option) {
- req[option.key] = option.val
- });
- }
- return($http(req).then(handleSuccess, handleError));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement