node package manager


a bunch of network (mainly HTTP) constants for js programs (node + browser), AMD


A clean declaration of network constants (only HTTP for now) for js programs.

Useful when developing network programs or if you want to use HTTP semantics (REST API).

Works in node.js + browser, AMD.

Full testsuite. No dependencies.

License : public domain (

Fell free to suggest and contribute.

Interesting reads : (us / french)

if (typeof define !== 'function') { var define = require('amdefine')(module); } // node only 
function(http_constants) {
    "use strict";
    console.log( http_constants.methods.get ); // "GET" 
    console.log( http_constants.status_codes.status_400_client_error_bad_request ); // 400 
    console.log( http_constants.status_messages[404] ); // "Not Found" 

Bower : bower install network-constants.js Npm : npm install network-constants

Browser : open test_runner/mocha.html Node : npm test