{"library":"node-http","title":"Node.js HTTP Client Wrapper","description":"This package, `node-http`, provides a minimalistic interface for making HTTP requests within Node.js applications. Originally published over 12 years ago (latest version 0.0.5 from October 2013), it aims to unify the HTTP request process with a chainable API for setting URL, headers, data, and method, alongside event-based callbacks for completion, success, and failure. Due to its age and lack of updates, it is considered abandoned. It exclusively uses CommonJS syntax and does not support modern JavaScript features like Promises or async/await, nor does it officially support contemporary Node.js versions or ESM. Its release cadence was effectively one-off, with no subsequent development. Key differentiators at the time might have been its simplified event-driven approach, but it is now severely outdated compared to actively maintained alternatives like `axios` or Node.js's native `fetch` API.","language":"javascript","status":"abandoned","last_verified":"Sun Apr 19","install":{"commands":["npm install node-http"],"cli":null},"imports":["const NodeHttp = require('node-http');","const NodeHttp = require('node-http');\nconst nodeHttp = new NodeHttp();"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const NodeHttp = require('node-http');\nconst nodeHttp = new NodeHttp();\n\n// Example: Perform a GET request\nnodeHttp.GET('http://example.com/data', function (response) {\n  console.log('Success:', response.responseText);\n  console.log('Status Code:', response.statusCode);\n}).fail(function (error) {\n  console.error('Failed to fetch data:', error);\n});\n\n// Example: Perform a POST request with data\nnodeHttp.POST('http://example.com/submit', { key: 'value', id: 123 }, function (response) {\n  console.log('Post Success:', response.responseText);\n}).on('error', function(err) {\n  console.error('Post Error:', err);\n});\n\n// Example: Listening for specific status codes\nnodeHttp.on(200, function(response) {\n  console.log('HTTP 200 OK received for a request.');\n});\n\nnodeHttp.on('Not Found', function(response) {\n  console.error('HTTP 404 Not Found received.');\n});","lang":"javascript","description":"Demonstrates initializing the client, making a GET request, a POST request with data, and handling responses and specific HTTP status events using callbacks.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}