@ooneex/fetcher 0.17.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -21
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
# @ooneex/fetcher
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Lightweight HTTP client with typed headers, response parsing, and configurable request/response handling for external API integration. This package provides a fluent API for HTTP operations with built-in support for authentication tokens, content types, request cancellation, and file uploads.
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|

|
|
7
|
-

|
|
8
|
-

|
|
9
7
|

|
|
10
8
|

|
|
11
9
|
|
|
@@ -13,7 +11,7 @@ A lightweight HTTP client wrapper for making fetch requests with typed headers a
|
|
|
13
11
|
|
|
14
12
|
✅ **Simple API** - Intuitive methods for GET, POST, PUT, PATCH, DELETE, HEAD, and OPTIONS
|
|
15
13
|
|
|
16
|
-
✅ **
|
|
14
|
+
✅ **Typed Responses** - Generic response types with `ResponseDataType<T>` for full TypeScript support
|
|
17
15
|
|
|
18
16
|
✅ **Authentication** - Built-in support for Bearer and Basic authentication tokens
|
|
19
17
|
|
|
@@ -21,7 +19,7 @@ A lightweight HTTP client wrapper for making fetch requests with typed headers a
|
|
|
21
19
|
|
|
22
20
|
✅ **Request Cancellation** - Abort in-flight requests with AbortController integration
|
|
23
21
|
|
|
24
|
-
✅ **Header Management** -
|
|
22
|
+
✅ **Header Management** - Typed header manipulation via `@ooneex/http-header`
|
|
25
23
|
|
|
26
24
|
✅ **Base URL Support** - Configure base URL for cleaner API calls
|
|
27
25
|
|
|
@@ -29,26 +27,10 @@ A lightweight HTTP client wrapper for making fetch requests with typed headers a
|
|
|
29
27
|
|
|
30
28
|
## Installation
|
|
31
29
|
|
|
32
|
-
### Bun
|
|
33
30
|
```bash
|
|
34
31
|
bun add @ooneex/fetcher
|
|
35
32
|
```
|
|
36
33
|
|
|
37
|
-
### pnpm
|
|
38
|
-
```bash
|
|
39
|
-
pnpm add @ooneex/fetcher
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Yarn
|
|
43
|
-
```bash
|
|
44
|
-
yarn add @ooneex/fetcher
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### npm
|
|
48
|
-
```bash
|
|
49
|
-
npm install @ooneex/fetcher
|
|
50
|
-
```
|
|
51
|
-
|
|
52
34
|
## Usage
|
|
53
35
|
|
|
54
36
|
### Basic GET Request
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ooneex/fetcher",
|
|
3
|
-
"description": "
|
|
4
|
-
"version": "
|
|
3
|
+
"description": "Lightweight HTTP client with typed headers, response parsing, and configurable request/response handling for external API integration",
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
"test": "bun test tests",
|
|
26
26
|
"build": "bunup",
|
|
27
27
|
"lint": "tsgo --noEmit && bunx biome lint",
|
|
28
|
-
"npm:publish": "bun publish --tolerate-republish --access public"
|
|
28
|
+
"npm:publish": "bun publish --tolerate-republish --force --production --access public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@ooneex/http-header": "
|
|
31
|
+
"@ooneex/http-header": "1.1.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@ooneex/http-response": "
|
|
35
|
-
"@ooneex/http-mimes": "
|
|
36
|
-
"@ooneex/types": "
|
|
34
|
+
"@ooneex/http-response": "1.1.0",
|
|
35
|
+
"@ooneex/http-mimes": "1.0.1",
|
|
36
|
+
"@ooneex/types": "1.0.1"
|
|
37
37
|
},
|
|
38
38
|
"keywords": [
|
|
39
39
|
"api-client",
|