{"library":"resilient","title":"Resilient HTTP Client","description":"A fault-tolerant, reactive HTTP client for Node.js and browsers, designed for distributed systems and microservices. Version 0.4.0 (latest, last released in 2016, no recent updates) provides transparent server fallback, dynamic server discovery (e.g., via Consul), request retry/backoff, and client-side load balancing based on empirical server latency. It is middleware-oriented, lightweight (~9KB gzipped), dependency-free, and supports both callback and promise-based async requests. Differentiates from alternatives like Axios or Got by focusing on resilience patterns (circuit breaker, failover) inspired by Netflix's Ribbon and Chaos Engineering.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install resilient"],"cli":null},"imports":["const resilient = require('resilient');","const client = resilient({ service: { basePath: '/api' } });","client.use(middleware());"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const resilient = require('resilient');\nconst client = resilient({\n  service: {\n    basePath: '/api',\n    timeout: 5000,\n    retry: 2,\n    fallback: true\n  },\n  discovery: {\n    servers: ['http://server1.example.com', 'http://server2.example.com'],\n    interval: 30000\n  },\n  balancer: {\n    policy: 'roundRobin'\n  }\n});\n\nclient.get('/users', (err, res) => {\n  if (err) {\n    console.error('Request failed:', err.message);\n  } else {\n    console.log('Response:', res.body);\n  }\n});","lang":"javascript","description":"Creates a resilient client with static server discovery, retry, fallback, and round-robin load balancing, then performs a GET request.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}