You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: content/features.md
+2-16
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,5 @@
1
1
# Features
2
2
3
-
Here's a Markdown file listing all the features and details about the `useNetStack` package:
4
-
5
-
````markdown
6
3
# useNetStack - A Powerful Composable for API Requests
7
4
8
5
`useNetStack` is a versatile Vue 3/Nuxt 3 composable that abstracts and enhances API requests with built-in features like retries, caching, timeouts, request cancellation, and logging. It is designed to handle common challenges in API requests while providing a flexible and configurable structure.
@@ -32,16 +29,13 @@ executeCall({
32
29
retryDelay: 2000, // 2-second delay between retries
33
30
});
34
31
```
35
-
````
36
32
37
33
### 2. **Timeouts**
38
34
39
35
Set time limits on API requests to avoid indefinite waiting.
40
36
41
37
-**Global Default**: 5 seconds
42
-
43
38
-**Customizable**: Timeout can be set per request
44
-
45
39
-**Example**:
46
40
47
41
```ts
@@ -61,11 +55,8 @@ executeCall({
61
55
Cache responses for a specified duration to minimize redundant network calls.
62
56
63
57
-**Global Default**: Cached for 1 minute
64
-
65
58
-**Customizable**: Set `cacheDuration` per request
66
-
67
59
-**Skip Cache**: Force bypassing cache by setting `skipCache: true`
68
-
69
60
-**Example**:
70
61
71
62
```ts
@@ -87,9 +78,7 @@ executeCall({
87
78
Abort ongoing requests using an `AbortController`.
[ERROR]: API call failed { endpoint: 'https://api.example.com/data', error: 'Timeout' }
148
-
149
134
```
150
135
151
136
## Methods
@@ -304,7 +289,8 @@ updateGlobalConfig({
304
289
305
290
The `useNetStack` composable enhances the process of making API requests by providing support for retries, timeouts, caching, cancellation, and logging. It is flexible, with both per-request and global configurations available, making it a powerful tool for handling network requests in your Vue 3/Nuxt 3 applications.
306
291
307
-
```
292
+
```text
308
293
309
294
This markdown file contains a detailed description of the package and covers all features introduced in `useNetStack`.
0 commit comments