An HTTP client library for Node.js (v3.4.0) that simplifies making HTTP requests with automatic serialization of POST data, query strings, and deserialization of XML, JSON, and YAML responses. It handles redirects, multipart file uploads, SSL, basic auth, content-encoding (gzip, deflate), and charset via iconv-lite. Compared to modern alternatives like axios or node-fetch, restler is older, less actively maintained, and uses an event-based API that can lead to memory leaks if not managed properly. It supports Node >= 0.10.x, with limited maintenance; version 3.4.0 is the latest, with no major updates since 2015.
npm install restlerVerified import paths — ran on the pinned version, not inferred.
Demonstrates a basic GET request with authentication and handling the 'complete' event to check for errors.
Always attach 'error' or 'complete' listeners and handle errors properly.
Consider migrating to axios, node-fetch, or got.
Install xml2js, yaml, etc. if needed, or disable parsing.
Run 'npm install restler'.
Use 'const restler = require('restler');' instead of import.