npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

angularjs-requester--http

v0.1.1

Published

Simply way todo GET, POST, PUT and DELETE requestes

Downloads

21

Readme

#Angularjs-requester-http Simply way todo GET, POST, PUT and DELETE requestes

###Installing:

npm i angularjs-requester--http --save

Add 'RequesterModule' to your main module's list of dependencies. When you're done, your setup should look similar to the following:

<!doctype html>
<html ng-app="myApp">
<head>

</head>
<body>
    ...
    <script src="node_modules/angularjs-requester--http/angularjs-requester--http.js"></script>
    ...
    <script>
        var myApp = angular.module('myApp', ['RequesterModule']);
    </script>
    ...
</body>
</html>

###Examples:

What things you need to install the software and how to install them

GET

 return requesterNg.get("/user/", filter).then(function (users) {
    console.log(users);
    return users;
 });

or

return requesterNg.get("/user/", filter);

POST

 return requesterNg.post("/user/", data).then(function (savedUser) {
    console.log(savedUser);
    return savedUser;
 });

or

return requesterNg.post("/user/", data);

PUT

 return requesterNg.post("/user/", data).then(function (updatedUser) {
    console.log(updatedUser);
    return updatedUser;
 });

or

return requesterNg.post("/user/", data);

DELETE

 // After Status Code: 200
 return requesterNg.delete("/user/" + id).then(function () {
      return users.splice(users.indexOff(user), 1);
 });

or

return requesterNg.delete("/user/" + id);

##Set and Remove token:

Set

 function LoginCtrl($scope, requesterNg) {
     $scope.login = function (user) {
         UserRepository.authenticate(user).then(function successCallback(user.token) {
             requesterNg.setToken(user.token);
         });
     };
 }

Remove

function LoginCtrl($scope, requesterNg) {
     $scope.logOut = function() {
         requesterNg.clearToken();
     };
 }

##Work example:

(function () {
    'use strict';

    var main = angular.module('app', ['RequesterModule']);

    main.config(['$routeProvider', function ($routeProvider) {
        $routeProvider
            .when('/', {template: '<main></main>'})
        ;
        $routeProvider.otherwise({ redirectTo: '/' });
    }]);

    // set main url for requests
    main.run(function(requesterNg) {
        requesterNg.setUrl("http://localhost:7000");
    });

})();


(function () {
    'use strict';
    angular.module('app')
        .service('UserRepository', UserRepository);

    function UserRepository(requesterNg) {
        return {
            
            getList: function (filter) {

                // return requesterNg.get("/user/", filter).then(function (users) {
                //
                // });

                return requesterNg.get("/user/", filter);
            }, 
            
            getById: function (id) {

                // return requesterNg.getById("/user/" + id).then(function (user) {
                //
                // });

                return requesterNg.getById("/user/" + id);
            }, 
            
            save: function (data) {

                // return requesterNg.post("/user/", data).then(function (savedUser) {
                //
                // });

                return requesterNg.post("/user/", data);
            },
            
            update: function (data) {

                // return requesterNg.put("/user/", data).then(function (updatedUser) {
                //
                // });

                return requesterNg.put("/user/", data);
            }, 
            
            remove: function (id) {

                // after Status Code: 200
                // return requesterNg.delete("/user/" + id).then(function () {
                //      users.splice(users.indexOff(user), 1);
                // });

                return requesterNg.delete("/user/" + id);
            }
        };
    }
})();