A simple Node.js module wrapping Node's native http/https module, targeting JSON data exchange between servers. Version 1.1.3 provides GET, POST, PUT, DELETE requests with both callback and Promise support. It allows base URL initialization and can be subclassed for custom service APIs. Limited documentation and low maintenance activity; no significant updates since 2018. Suitable for simple JSON-based server-to-server communication but lacks advanced features like interceptors, retries, or streaming support found in Axios or Got.
npm install http-serviceNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage: creating an instance, initializing with a base URL, and performing GET, POST, and DELETE requests with callbacks and Promises.
Always validate the URL before calling init, and use try-catch around instantiation.
Choose one pattern (prefer callbacks for consistency) and stick to it.
Set environment variable NODE_TLS_REJECT_UNAUTHORIZED=0 (not recommended for production) or use a custom agent.
Serialize nested query parameters manually using a library like qs or querystring.
Run 'npm install http-service' in your project directory.
Create an instance: const service = new HttpService(); then call service.get().
Ensure the URL is correct and the server is reachable. Use an IP or valid domain.
No dependency data recorded yet.