{"id":26647229,"url":"https://github.com/offirmo/network-constants.js","last_synced_at":"2025-03-24T23:51:28.452Z","repository":{"id":11228769,"uuid":"13620903","full_name":"Offirmo/network-constants.js","owner":"Offirmo","description":"Just a bunch of network (mainly HTTP) constants for js programs (node + browser), AMD","archived":false,"fork":false,"pushed_at":"2014-09-12T16:28:49.000Z","size":292,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T06:11:20.779Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Offirmo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-16T14:13:06.000Z","updated_at":"2015-01-20T16:17:17.000Z","dependencies_parsed_at":"2022-09-11T07:50:50.323Z","dependency_job_id":null,"html_url":"https://github.com/Offirmo/network-constants.js","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Offirmo%2Fnetwork-constants.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Offirmo%2Fnetwork-constants.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Offirmo%2Fnetwork-constants.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Offirmo%2Fnetwork-constants.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Offirmo","download_url":"https://codeload.github.com/Offirmo/network-constants.js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245372366,"owners_count":20604490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-24T23:51:27.788Z","updated_at":"2025-03-24T23:51:28.424Z","avatar_url":"https://github.com/Offirmo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"network-constants.js\n====================\n\n[![Build Status](https://travis-ci.org/Offirmo/network-constants.js.png?branch=master)](https://travis-ci.org/Offirmo/network-constants.js)\n[![NPM version](https://badge.fury.io/js/network-constants.png)](http://badge.fury.io/js/network-constants)\n[![Bower version](https://badge.fury.io/bo/network-constants.js.png)](http://badge.fury.io/bo/network-constants.js)\n[![Dependency Status](https://gemnasium.com/Offirmo/network-constants.js.png)](https://gemnasium.com/Offirmo/network-constants.js)\n[![Project status](http://img.shields.io/badge/project_status-stable_and_active-brightgreen.svg)](http://offirmo.net/classifying-open-source-projects-status/)\n[![license](http://img.shields.io/badge/license-public_domain-brightgreen.svg)](http://unlicense.org/)\n[![Code Climate](https://codeclimate.com/github/Offirmo/network-constants.js.png)](https://codeclimate.com/github/Offirmo/network-constants.js)\n[![status](https://sourcegraph.com/api/repos/github.com/Offirmo/network-constants.js/badges/status.png)](https://sourcegraph.com/github.com/Offirmo/network-constants.js)\n[![Total views](https://sourcegraph.com/api/repos/github.com/Offirmo/network-constants.js/counters/views.png)](https://sourcegraph.com/github.com/Offirmo/network-constants.js)\n[![Gittip](http://img.shields.io/gittip/Offirmo.svg)](https://www.gittip.com/Offirmo/)\n\nIntroduction\n------------\n\nA clean declaration of network constants (only HTTP for now) for js programs.\n\nUseful when developing network programs or if you want to use HTTP semantics (REST API).\n\nWorks in node.js + browser, AMD.\n\nFull testsuite. No dependencies.\n\nLicense : public domain (http://unlicense.org/)\n\nFell free to suggest and contribute.\n\nInteresting reads :\nhttp://en.wikipedia.org/wiki/List_of_HTTP_status_codes\nhttp://www.codeshttp.com/  (us / french)\nhttp://benramsey.com/blog/2009/02/http-status-100-continue-corrections/\nhttp://benramsey.com/blog/2008/04/http-status-201-created-vs-202-accepted/\nhttp://benramsey.com/blog/2008/05/http-status-204-no-content-and-205-reset-content/\nhttp://benramsey.com/blog/2008/05/206-partial-content-and-range-requests/\nhttp://benramsey.com/blog/2009/11/post-vs-put/\n\nUsage\n-----\n\n```javascript\nif (typeof define !== 'function') { var define = require('amdefine')(module); } // node only\n\ndefine(\n[\n\t'network-constants/http'\n],\nfunction(http_constants) {\n\t\"use strict\";\n\n\tconsole.log( http_constants.methods.get ); // \"GET\"\n\tconsole.log( http_constants.status_codes.status_400_client_error_bad_request ); // 400\n\tconsole.log( http_constants.status_messages[404] ); // \"Not Found\"\n\t...\n```\n\nInstallation\n------------\n\nBower : `bower install network-constants.js`\nNpm : `npm install network-constants`\n\nUnit tests\n----------\n\nBrowser : open test_runner/mocha.html\nNode : `npm test`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffirmo%2Fnetwork-constants.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foffirmo%2Fnetwork-constants.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffirmo%2Fnetwork-constants.js/lists"}