@ooneex/http-header 0.17.0 → 1.0.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 +11 -29
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
# @ooneex/http-header
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
HTTP header parser with user agent detection, browser fingerprinting, device identification, and content negotiation utilities.
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|

|
|
7
|
-

|
|
8
|
-

|
|
9
7
|

|
|
10
8
|

|
|
11
9
|
|
|
12
10
|
## Features
|
|
13
11
|
|
|
14
|
-
✅ **
|
|
12
|
+
✅ **Read/Write Header Management** - Full support via `Header` (read/write) and `ReadonlyHeader` (read-only) classes
|
|
15
13
|
|
|
16
|
-
✅ **
|
|
17
|
-
|
|
18
|
-
✅ **User Agent Parsing** - Built-in user agent detection and parsing with device information
|
|
14
|
+
✅ **User Agent Parsing** - Built-in user agent detection powered by ua-parser-js with browser, OS, device, and CPU info
|
|
19
15
|
|
|
20
|
-
✅ **Content
|
|
16
|
+
✅ **Content Negotiation** - Easy MIME type, charset, language, and encoding management
|
|
21
17
|
|
|
22
|
-
✅ **Authentication Support** - Built-in methods for Basic Auth, Bearer tokens
|
|
18
|
+
✅ **Authentication Support** - Built-in methods for Basic Auth, Bearer tokens, and custom authorization
|
|
23
19
|
|
|
24
20
|
✅ **Cookie Management** - Comprehensive cookie parsing and setting with all options
|
|
25
21
|
|
|
@@ -27,38 +23,24 @@ A comprehensive TypeScript/JavaScript library for working with HTTP headers. Thi
|
|
|
27
23
|
|
|
28
24
|
✅ **Security Headers** - Built-in support for common security headers (CSP, HSTS, XSS)
|
|
29
25
|
|
|
30
|
-
✅ **Caching Headers** - Cache control and
|
|
26
|
+
✅ **Caching Headers** - Cache control, ETags, and conditional request management
|
|
31
27
|
|
|
32
|
-
✅ **Client IP Detection** - Multiple methods to detect client IP addresses
|
|
28
|
+
✅ **Client IP Detection** - Multiple methods to detect client IP addresses (X-Forwarded-For, X-Real-IP)
|
|
29
|
+
|
|
30
|
+
✅ **Request Type Detection** - Detect HTTPS, AJAX, and CORS requests
|
|
33
31
|
|
|
34
32
|
✅ **Method Chaining** - Fluent API for easy header manipulation
|
|
35
33
|
|
|
36
|
-
✅ **
|
|
34
|
+
✅ **Type-Safe** - Full TypeScript support with proper type definitions
|
|
37
35
|
|
|
38
|
-
✅ **
|
|
36
|
+
✅ **Cross-Platform** - Works in Browser, Node.js, Bun, and Deno
|
|
39
37
|
|
|
40
38
|
## Installation
|
|
41
39
|
|
|
42
|
-
### Bun
|
|
43
40
|
```bash
|
|
44
41
|
bun add @ooneex/http-header
|
|
45
42
|
```
|
|
46
43
|
|
|
47
|
-
### pnpm
|
|
48
|
-
```bash
|
|
49
|
-
pnpm add @ooneex/http-header
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### Yarn
|
|
53
|
-
```bash
|
|
54
|
-
yarn add @ooneex/http-header
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### npm
|
|
58
|
-
```bash
|
|
59
|
-
npm install @ooneex/http-header
|
|
60
|
-
```
|
|
61
|
-
|
|
62
44
|
## Usage
|
|
63
45
|
|
|
64
46
|
### Basic Header Operations
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ooneex/http-header",
|
|
3
|
-
"description": "HTTP header
|
|
4
|
-
"version": "0.
|
|
3
|
+
"description": "HTTP header parser with user agent detection, browser fingerprinting, device identification, and content negotiation utilities",
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"ua-parser-js": "^2.0.6"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@ooneex/http-mimes": "0.0.
|
|
35
|
-
"@ooneex/types": "0.0.
|
|
34
|
+
"@ooneex/http-mimes": "0.0.18",
|
|
35
|
+
"@ooneex/types": "0.0.19"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [
|
|
38
38
|
"browser",
|