> For the complete documentation index, see [llms.txt](https://jscula.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jscula.gitbook.io/docs/ajax/nexus-http-client/features-breakdown.md).

# Features Breakdown

## Caching for GET Requests

Enable caching to avoid redundant network requests. Cached responses are served instantly.

```javascript
const client = nexus.create({
  baseURL: 'https://api.example.com',
  cacheEnabled: true,
});

client.get('/posts'); // Network call
client.get('/posts'); // Served from cache
```

## Retry Mechanism

Configure automatic retries for transient failures:

```javascript
const client = nexus.create({
  baseURL: 'https://api.example.com',
  retryConfig: { retries: 3, delay: 1000 }, // 3 retries with 1-second delay
});
```

***

### Comparison: Nexus vs Axios

| Feature             | **Nexus**                  | **Axios**                 |
| ------------------- | -------------------------- | ------------------------- |
| **Dependencies**    | None                       | Yes                       |
| **Caching**         | Built-in for GET           | No (requires custom code) |
| **Retry Mechanism** | Built-in                   | No (requires plugins)     |
| **File Size**       | Lightweight                | Larger (external deps)    |
| **Customizability** | High                       | Moderate                  |
| **Ease of Use**     | Simple, intuitive          | Simple                    |
| **Error Handling**  | Structured with `response` | Basic                     |
