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

npm install network-constants
10 downloads in the last month


Build Status NPM version Bower version Dependency Status Project status license Code Climate status Total views Gittip


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

Unit tests

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

npm loves you