nlcurl 0.6.0 → 0.8.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 +143 -140
- package/dist/cache/groups.d.ts +75 -0
- package/dist/cache/groups.d.ts.map +1 -0
- package/dist/cache/groups.js +118 -0
- package/dist/cache/groups.js.map +1 -0
- package/dist/cache/no-vary-search.d.ts +33 -0
- package/dist/cache/no-vary-search.d.ts.map +1 -0
- package/dist/cache/no-vary-search.js +148 -0
- package/dist/cache/no-vary-search.js.map +1 -0
- package/dist/cache/range.d.ts +120 -0
- package/dist/cache/range.d.ts.map +1 -0
- package/dist/cache/range.js +193 -0
- package/dist/cache/range.js.map +1 -0
- package/dist/cache/store.d.ts +111 -0
- package/dist/cache/store.d.ts.map +1 -0
- package/dist/cache/store.js +414 -0
- package/dist/cache/store.js.map +1 -0
- package/dist/cache/types.d.ts +69 -0
- package/dist/cache/types.d.ts.map +1 -0
- package/dist/cache/types.js +2 -0
- package/dist/cache/types.js.map +1 -0
- package/dist/cli/args.d.ts +4 -37
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +3 -4
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/index.d.ts +0 -5
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1 -6
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/output.d.ts +14 -20
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +14 -20
- package/dist/cli/output.js.map +1 -1
- package/dist/cookies/jar.d.ts +33 -31
- package/dist/cookies/jar.d.ts.map +1 -1
- package/dist/cookies/jar.js +69 -33
- package/dist/cookies/jar.js.map +1 -1
- package/dist/cookies/parser.d.ts +14 -16
- package/dist/cookies/parser.d.ts.map +1 -1
- package/dist/cookies/parser.js +30 -13
- package/dist/cookies/parser.js.map +1 -1
- package/dist/cookies/psl-data.d.ts +1 -1
- package/dist/cookies/psl-data.js +1 -1
- package/dist/cookies/public-suffix.d.ts +5 -27
- package/dist/cookies/public-suffix.d.ts.map +1 -1
- package/dist/cookies/public-suffix.js +5 -37
- package/dist/cookies/public-suffix.js.map +1 -1
- package/dist/core/auth.d.ts +30 -0
- package/dist/core/auth.d.ts.map +1 -0
- package/dist/core/auth.js +34 -0
- package/dist/core/auth.js.map +1 -0
- package/dist/core/client.d.ts +28 -40
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/client.js +34 -41
- package/dist/core/client.js.map +1 -1
- package/dist/core/errors.d.ts +64 -88
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +64 -88
- package/dist/core/errors.js.map +1 -1
- package/dist/core/request.d.ts +63 -85
- package/dist/core/request.d.ts.map +1 -1
- package/dist/core/response.d.ts +64 -59
- package/dist/core/response.d.ts.map +1 -1
- package/dist/core/response.js +70 -52
- package/dist/core/response.js.map +1 -1
- package/dist/core/session.d.ts +81 -70
- package/dist/core/session.d.ts.map +1 -1
- package/dist/core/session.js +198 -71
- package/dist/core/session.js.map +1 -1
- package/dist/core/validation.d.ts +44 -42
- package/dist/core/validation.d.ts.map +1 -1
- package/dist/core/validation.js +47 -58
- package/dist/core/validation.js.map +1 -1
- package/dist/dns/cache.d.ts +59 -0
- package/dist/dns/cache.d.ts.map +1 -0
- package/dist/dns/cache.js +99 -0
- package/dist/dns/cache.js.map +1 -0
- package/dist/dns/codec.d.ts +39 -0
- package/dist/dns/codec.d.ts.map +1 -0
- package/dist/dns/codec.js +238 -0
- package/dist/dns/codec.js.map +1 -0
- package/dist/dns/doh-resolver.d.ts +38 -0
- package/dist/dns/doh-resolver.d.ts.map +1 -0
- package/dist/dns/doh-resolver.js +191 -0
- package/dist/dns/doh-resolver.js.map +1 -0
- package/dist/dns/dot-resolver.d.ts +89 -0
- package/dist/dns/dot-resolver.d.ts.map +1 -0
- package/dist/dns/dot-resolver.js +158 -0
- package/dist/dns/dot-resolver.js.map +1 -0
- package/dist/dns/https-rr.d.ts +40 -0
- package/dist/dns/https-rr.d.ts.map +1 -0
- package/dist/dns/https-rr.js +109 -0
- package/dist/dns/https-rr.js.map +1 -0
- package/dist/dns/types.d.ts +82 -0
- package/dist/dns/types.d.ts.map +1 -0
- package/dist/dns/types.js +23 -0
- package/dist/dns/types.js.map +1 -0
- package/dist/fingerprints/akamai.d.ts +3 -11
- package/dist/fingerprints/akamai.d.ts.map +1 -1
- package/dist/fingerprints/akamai.js +3 -11
- package/dist/fingerprints/akamai.js.map +1 -1
- package/dist/fingerprints/database.d.ts +6 -14
- package/dist/fingerprints/database.d.ts.map +1 -1
- package/dist/fingerprints/database.js +6 -14
- package/dist/fingerprints/database.js.map +1 -1
- package/dist/fingerprints/extensions.d.ts +56 -71
- package/dist/fingerprints/extensions.d.ts.map +1 -1
- package/dist/fingerprints/extensions.js +58 -71
- package/dist/fingerprints/extensions.js.map +1 -1
- package/dist/fingerprints/ja3.d.ts +12 -30
- package/dist/fingerprints/ja3.d.ts.map +1 -1
- package/dist/fingerprints/ja3.js +12 -30
- package/dist/fingerprints/ja3.js.map +1 -1
- package/dist/fingerprints/ja4.d.ts +18 -0
- package/dist/fingerprints/ja4.d.ts.map +1 -0
- package/dist/fingerprints/ja4.js +83 -0
- package/dist/fingerprints/ja4.js.map +1 -0
- package/dist/fingerprints/profiles/chrome.d.ts +18 -21
- package/dist/fingerprints/profiles/chrome.d.ts.map +1 -1
- package/dist/fingerprints/profiles/chrome.js +35 -31
- package/dist/fingerprints/profiles/chrome.js.map +1 -1
- package/dist/fingerprints/profiles/edge.d.ts +7 -10
- package/dist/fingerprints/profiles/edge.d.ts.map +1 -1
- package/dist/fingerprints/profiles/edge.js +7 -10
- package/dist/fingerprints/profiles/edge.js.map +1 -1
- package/dist/fingerprints/profiles/firefox.d.ts +8 -11
- package/dist/fingerprints/profiles/firefox.d.ts.map +1 -1
- package/dist/fingerprints/profiles/firefox.js +8 -11
- package/dist/fingerprints/profiles/firefox.js.map +1 -1
- package/dist/fingerprints/profiles/safari.d.ts +11 -14
- package/dist/fingerprints/profiles/safari.d.ts.map +1 -1
- package/dist/fingerprints/profiles/safari.js +11 -14
- package/dist/fingerprints/profiles/safari.js.map +1 -1
- package/dist/fingerprints/profiles/tor.d.ts +5 -8
- package/dist/fingerprints/profiles/tor.d.ts.map +1 -1
- package/dist/fingerprints/profiles/tor.js +5 -8
- package/dist/fingerprints/profiles/tor.js.map +1 -1
- package/dist/fingerprints/types.d.ts +42 -73
- package/dist/fingerprints/types.d.ts.map +1 -1
- package/dist/hsts/store.d.ts +39 -0
- package/dist/hsts/store.d.ts.map +1 -0
- package/dist/hsts/store.js +163 -0
- package/dist/hsts/store.js.map +1 -0
- package/dist/hsts/types.d.ts +24 -0
- package/dist/hsts/types.d.ts.map +1 -0
- package/dist/hsts/types.js +2 -0
- package/dist/hsts/types.js.map +1 -0
- package/dist/http/alt-svc.d.ts +67 -0
- package/dist/http/alt-svc.d.ts.map +1 -0
- package/dist/http/alt-svc.js +186 -0
- package/dist/http/alt-svc.js.map +1 -0
- package/dist/http/early-hints.d.ts +23 -0
- package/dist/http/early-hints.d.ts.map +1 -0
- package/dist/http/early-hints.js +33 -0
- package/dist/http/early-hints.js.map +1 -0
- package/dist/http/form-data.d.ts +17 -35
- package/dist/http/form-data.d.ts.map +1 -1
- package/dist/http/form-data.js +12 -34
- package/dist/http/form-data.js.map +1 -1
- package/dist/http/h1/client.d.ts +14 -26
- package/dist/http/h1/client.d.ts.map +1 -1
- package/dist/http/h1/client.js +29 -22
- package/dist/http/h1/client.js.map +1 -1
- package/dist/http/h1/encoder.d.ts +10 -17
- package/dist/http/h1/encoder.d.ts.map +1 -1
- package/dist/http/h1/encoder.js +10 -17
- package/dist/http/h1/encoder.js.map +1 -1
- package/dist/http/h1/parser.d.ts +22 -59
- package/dist/http/h1/parser.d.ts.map +1 -1
- package/dist/http/h1/parser.js +15 -47
- package/dist/http/h1/parser.js.map +1 -1
- package/dist/http/h2/client.d.ts +18 -59
- package/dist/http/h2/client.d.ts.map +1 -1
- package/dist/http/h2/client.js +29 -64
- package/dist/http/h2/client.js.map +1 -1
- package/dist/http/h2/frames.d.ts +53 -84
- package/dist/http/h2/frames.d.ts.map +1 -1
- package/dist/http/h2/frames.js +48 -76
- package/dist/http/h2/frames.js.map +1 -1
- package/dist/http/h2/hpack.d.ts +16 -35
- package/dist/http/h2/hpack.d.ts.map +1 -1
- package/dist/http/h2/hpack.js +16 -35
- package/dist/http/h2/hpack.js.map +1 -1
- package/dist/http/h3/detection.d.ts +15 -0
- package/dist/http/h3/detection.d.ts.map +1 -0
- package/dist/http/h3/detection.js +41 -0
- package/dist/http/h3/detection.js.map +1 -0
- package/dist/http/negotiator.d.ts +43 -33
- package/dist/http/negotiator.d.ts.map +1 -1
- package/dist/http/negotiator.js +99 -41
- package/dist/http/negotiator.js.map +1 -1
- package/dist/http/pool.d.ts +34 -64
- package/dist/http/pool.d.ts.map +1 -1
- package/dist/http/pool.js +22 -41
- package/dist/http/pool.js.map +1 -1
- package/dist/http/resumable-upload.d.ts +76 -0
- package/dist/http/resumable-upload.d.ts.map +1 -0
- package/dist/http/resumable-upload.js +104 -0
- package/dist/http/resumable-upload.js.map +1 -0
- package/dist/http/trailers.d.ts +29 -0
- package/dist/http/trailers.d.ts.map +1 -0
- package/dist/http/trailers.js +57 -0
- package/dist/http/trailers.js.map +1 -0
- package/dist/index.d.ts +36 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -1
- package/dist/index.js.map +1 -1
- package/dist/middleware/interceptor.d.ts +13 -32
- package/dist/middleware/interceptor.d.ts.map +1 -1
- package/dist/middleware/interceptor.js +11 -16
- package/dist/middleware/interceptor.js.map +1 -1
- package/dist/middleware/rate-limiter.d.ts +8 -17
- package/dist/middleware/rate-limiter.d.ts.map +1 -1
- package/dist/middleware/rate-limiter.js +15 -12
- package/dist/middleware/rate-limiter.js.map +1 -1
- package/dist/middleware/retry-after.d.ts +15 -0
- package/dist/middleware/retry-after.d.ts.map +1 -0
- package/dist/middleware/retry-after.js +36 -0
- package/dist/middleware/retry-after.js.map +1 -0
- package/dist/middleware/retry.d.ts +9 -18
- package/dist/middleware/retry.d.ts.map +1 -1
- package/dist/middleware/retry.js +12 -9
- package/dist/middleware/retry.js.map +1 -1
- package/dist/proxy/auth.d.ts +73 -0
- package/dist/proxy/auth.d.ts.map +1 -0
- package/dist/proxy/auth.js +128 -0
- package/dist/proxy/auth.js.map +1 -0
- package/dist/proxy/env-proxy.d.ts +11 -0
- package/dist/proxy/env-proxy.d.ts.map +1 -0
- package/dist/proxy/env-proxy.js +56 -0
- package/dist/proxy/env-proxy.js.map +1 -0
- package/dist/proxy/http-proxy.d.ts +13 -18
- package/dist/proxy/http-proxy.d.ts.map +1 -1
- package/dist/proxy/http-proxy.js +24 -14
- package/dist/proxy/http-proxy.js.map +1 -1
- package/dist/proxy/socks.d.ts +13 -20
- package/dist/proxy/socks.d.ts.map +1 -1
- package/dist/proxy/socks.js +6 -9
- package/dist/proxy/socks.js.map +1 -1
- package/dist/sse/parser.d.ts +47 -0
- package/dist/sse/parser.d.ts.map +1 -0
- package/dist/sse/parser.js +139 -0
- package/dist/sse/parser.js.map +1 -0
- package/dist/tls/constants.d.ts +15 -74
- package/dist/tls/constants.d.ts.map +1 -1
- package/dist/tls/constants.js +15 -74
- package/dist/tls/constants.js.map +1 -1
- package/dist/tls/ct.d.ts +78 -0
- package/dist/tls/ct.d.ts.map +1 -0
- package/dist/tls/ct.js +175 -0
- package/dist/tls/ct.js.map +1 -0
- package/dist/tls/early-data.d.ts +45 -0
- package/dist/tls/early-data.d.ts.map +1 -0
- package/dist/tls/early-data.js +46 -0
- package/dist/tls/early-data.js.map +1 -0
- package/dist/tls/ech.d.ts +130 -0
- package/dist/tls/ech.d.ts.map +1 -0
- package/dist/tls/ech.js +353 -0
- package/dist/tls/ech.js.map +1 -0
- package/dist/tls/keylog.d.ts +34 -0
- package/dist/tls/keylog.d.ts.map +1 -0
- package/dist/tls/keylog.js +64 -0
- package/dist/tls/keylog.js.map +1 -0
- package/dist/tls/node-engine.d.ts +15 -14
- package/dist/tls/node-engine.d.ts.map +1 -1
- package/dist/tls/node-engine.js +54 -14
- package/dist/tls/node-engine.js.map +1 -1
- package/dist/tls/ocsp.d.ts +55 -0
- package/dist/tls/ocsp.d.ts.map +1 -0
- package/dist/tls/ocsp.js +131 -0
- package/dist/tls/ocsp.js.map +1 -0
- package/dist/tls/pin-verification.d.ts +10 -0
- package/dist/tls/pin-verification.d.ts.map +1 -0
- package/dist/tls/pin-verification.js +28 -0
- package/dist/tls/pin-verification.js.map +1 -0
- package/dist/tls/session-cache.d.ts +58 -0
- package/dist/tls/session-cache.d.ts.map +1 -0
- package/dist/tls/session-cache.js +76 -0
- package/dist/tls/session-cache.js.map +1 -0
- package/dist/tls/stealth/client-hello.d.ts +34 -32
- package/dist/tls/stealth/client-hello.d.ts.map +1 -1
- package/dist/tls/stealth/client-hello.js +116 -11
- package/dist/tls/stealth/client-hello.js.map +1 -1
- package/dist/tls/stealth/engine.d.ts +5 -15
- package/dist/tls/stealth/engine.d.ts.map +1 -1
- package/dist/tls/stealth/engine.js +163 -47
- package/dist/tls/stealth/engine.js.map +1 -1
- package/dist/tls/stealth/handshake.d.ts +23 -32
- package/dist/tls/stealth/handshake.d.ts.map +1 -1
- package/dist/tls/stealth/handshake.js +112 -27
- package/dist/tls/stealth/handshake.js.map +1 -1
- package/dist/tls/stealth/key-schedule.d.ts +59 -86
- package/dist/tls/stealth/key-schedule.d.ts.map +1 -1
- package/dist/tls/stealth/key-schedule.js +46 -58
- package/dist/tls/stealth/key-schedule.js.map +1 -1
- package/dist/tls/stealth/record-layer.d.ts +52 -75
- package/dist/tls/stealth/record-layer.d.ts.map +1 -1
- package/dist/tls/stealth/record-layer.js +47 -63
- package/dist/tls/stealth/record-layer.js.map +1 -1
- package/dist/tls/stealth/tls12-handshake.d.ts +30 -0
- package/dist/tls/stealth/tls12-handshake.d.ts.map +1 -0
- package/dist/tls/stealth/tls12-handshake.js +470 -0
- package/dist/tls/stealth/tls12-handshake.js.map +1 -0
- package/dist/tls/types.d.ts +46 -48
- package/dist/tls/types.d.ts.map +1 -1
- package/dist/utils/buffer-reader.d.ts +26 -81
- package/dist/utils/buffer-reader.d.ts.map +1 -1
- package/dist/utils/buffer-reader.js +26 -81
- package/dist/utils/buffer-reader.js.map +1 -1
- package/dist/utils/buffer-writer.d.ts +30 -66
- package/dist/utils/buffer-writer.d.ts.map +1 -1
- package/dist/utils/buffer-writer.js +30 -66
- package/dist/utils/buffer-writer.js.map +1 -1
- package/dist/utils/compression.d.ts +18 -0
- package/dist/utils/compression.d.ts.map +1 -0
- package/dist/utils/compression.js +34 -0
- package/dist/utils/compression.js.map +1 -0
- package/dist/utils/dictionary-transport.d.ts +97 -0
- package/dist/utils/dictionary-transport.d.ts.map +1 -0
- package/dist/utils/dictionary-transport.js +171 -0
- package/dist/utils/dictionary-transport.js.map +1 -0
- package/dist/utils/encoding.d.ts +12 -28
- package/dist/utils/encoding.d.ts.map +1 -1
- package/dist/utils/encoding.js +77 -40
- package/dist/utils/encoding.js.map +1 -1
- package/dist/utils/happy-eyeballs.d.ts +20 -7
- package/dist/utils/happy-eyeballs.d.ts.map +1 -1
- package/dist/utils/happy-eyeballs.js +57 -25
- package/dist/utils/happy-eyeballs.js.map +1 -1
- package/dist/utils/logger.d.ts +54 -81
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +92 -64
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/tcp-fast-open.d.ts +30 -0
- package/dist/utils/tcp-fast-open.d.ts.map +1 -0
- package/dist/utils/tcp-fast-open.js +36 -0
- package/dist/utils/tcp-fast-open.js.map +1 -0
- package/dist/utils/url.d.ts +18 -25
- package/dist/utils/url.d.ts.map +1 -1
- package/dist/utils/url.js +18 -25
- package/dist/utils/url.js.map +1 -1
- package/dist/ws/client.d.ts +35 -52
- package/dist/ws/client.d.ts.map +1 -1
- package/dist/ws/client.js +92 -37
- package/dist/ws/client.js.map +1 -1
- package/dist/ws/frame.d.ts +27 -42
- package/dist/ws/frame.d.ts.map +1 -1
- package/dist/ws/frame.js +25 -37
- package/dist/ws/frame.js.map +1 -1
- package/dist/ws/permessage-deflate.d.ts +53 -0
- package/dist/ws/permessage-deflate.d.ts.map +1 -0
- package/dist/ws/permessage-deflate.js +140 -0
- package/dist/ws/permessage-deflate.js.map +1 -0
- package/package.json +62 -62
package/dist/core/request.d.ts
CHANGED
|
@@ -2,22 +2,34 @@ import type { CookieJar } from "../cookies/jar.js";
|
|
|
2
2
|
import type { Logger } from "../utils/logger.js";
|
|
3
3
|
import type { FormData } from "../http/form-data.js";
|
|
4
4
|
import type { TLSOptions } from "../tls/types.js";
|
|
5
|
+
import type { CacheConfig, CacheMode } from "../cache/types.js";
|
|
6
|
+
import type { HSTSConfig } from "../hsts/types.js";
|
|
7
|
+
import type { DNSConfig } from "../dns/types.js";
|
|
8
|
+
import type { ECHOptions } from "../tls/ech.js";
|
|
9
|
+
import type { AuthConfig } from "./auth.js";
|
|
10
|
+
import type { EarlyHintsCallback } from "../http/early-hints.js";
|
|
11
|
+
import type { RequestEncoding } from "../utils/compression.js";
|
|
5
12
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @typedef {'GET'|'POST'|'PUT'|'PATCH'|'DELETE'|'HEAD'|'OPTIONS'} HttpMethod
|
|
13
|
+
* Describes the progress of an upload or download operation.
|
|
9
14
|
*/
|
|
10
|
-
export
|
|
15
|
+
export interface ProgressEvent {
|
|
16
|
+
bytes: number;
|
|
17
|
+
totalBytes: number;
|
|
18
|
+
percent: number;
|
|
19
|
+
}
|
|
11
20
|
/**
|
|
12
|
-
*
|
|
13
|
-
* milliseconds elapsed from request initiation.
|
|
21
|
+
* Callback invoked during upload or download progress.
|
|
14
22
|
*
|
|
15
|
-
* @
|
|
16
|
-
* @
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
*
|
|
23
|
+
* @callback ProgressCallback
|
|
24
|
+
* @param {ProgressEvent} event - The current progress snapshot.
|
|
25
|
+
*/
|
|
26
|
+
export type ProgressCallback = (event: ProgressEvent) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Supported HTTP request methods.
|
|
29
|
+
*/
|
|
30
|
+
export type HttpMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | "QUERY";
|
|
31
|
+
/**
|
|
32
|
+
* Timing measurements for each phase of a request lifecycle, in milliseconds.
|
|
21
33
|
*/
|
|
22
34
|
export interface RequestTimings {
|
|
23
35
|
dns: number;
|
|
@@ -27,14 +39,7 @@ export interface RequestTimings {
|
|
|
27
39
|
total: number;
|
|
28
40
|
}
|
|
29
41
|
/**
|
|
30
|
-
* Per-phase timeout
|
|
31
|
-
* a field means no limit is applied for that phase.
|
|
32
|
-
*
|
|
33
|
-
* @typedef {Object} TimeoutConfig
|
|
34
|
-
* @property {number} [connect] - Maximum milliseconds to establish the TCP connection.
|
|
35
|
-
* @property {number} [tls] - Maximum milliseconds to complete the TLS handshake.
|
|
36
|
-
* @property {number} [response] - Maximum milliseconds to receive the first response byte.
|
|
37
|
-
* @property {number} [total] - Maximum total milliseconds for the whole request.
|
|
42
|
+
* Per-phase timeout thresholds for a request, in milliseconds.
|
|
38
43
|
*/
|
|
39
44
|
export interface TimeoutConfig {
|
|
40
45
|
connect?: number;
|
|
@@ -43,42 +48,12 @@ export interface TimeoutConfig {
|
|
|
43
48
|
total?: number;
|
|
44
49
|
}
|
|
45
50
|
/**
|
|
46
|
-
*
|
|
47
|
-
* plain strings are serialized automatically; raw `Buffer`s and
|
|
48
|
-
* `URLSearchParams` are used verbatim.
|
|
49
|
-
*
|
|
50
|
-
* @typedef {string|Buffer|URLSearchParams|Record<string,unknown>|ReadableStream<Uint8Array>|null} RequestBody
|
|
51
|
+
* Acceptable request body types for outgoing HTTP requests.
|
|
51
52
|
*/
|
|
52
53
|
export type RequestBody = string | Buffer | URLSearchParams | Record<string, unknown> | ReadableStream<Uint8Array> | FormData | null;
|
|
53
54
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* @typedef {Object} NLcURLRequest
|
|
58
|
-
* @property {string} url - Absolute or relative URL to request.
|
|
59
|
-
* @property {HttpMethod} [method='GET'] - HTTP method.
|
|
60
|
-
* @property {Record<string,string>} [headers] - Request headers to merge with session defaults.
|
|
61
|
-
* @property {RequestBody} [body] - Request body payload.
|
|
62
|
-
* @property {number|TimeoutConfig} [timeout] - Timeout in ms (flat) or per-phase config object.
|
|
63
|
-
* @property {AbortSignal} [signal] - Signal used to cancel the request early.
|
|
64
|
-
* @property {string} [impersonate] - Browser profile name (e.g. `"chrome136"`).
|
|
65
|
-
* @property {string} [ja3] - Custom JA3 fingerprint string override.
|
|
66
|
-
* @property {string} [akamai] - Custom Akamai HTTP/2 fingerprint override.
|
|
67
|
-
* @property {boolean} [stealth] - Use the custom stealth TLS engine.
|
|
68
|
-
* @property {boolean} [followRedirects=true] - Follow HTTP redirects automatically.
|
|
69
|
-
* @property {number} [maxRedirects=20] - Maximum number of redirects to follow.
|
|
70
|
-
* @property {boolean} [insecure] - Skip TLS certificate verification.
|
|
71
|
-
* @property {string} [proxy] - Proxy URL (`http://`, `socks4://`, `socks5://`).
|
|
72
|
-
* @property {[string,string]} [proxyAuth] - Proxy credentials as `[username, password]`.
|
|
73
|
-
* @property {'1.1'|'2'} [httpVersion] - Force a specific HTTP protocol version.
|
|
74
|
-
* @property {string} [baseURL] - Base URL prepended to relative `url` values.
|
|
75
|
-
* @property {Record<string,string|number|boolean>} [params] - Query parameters appended to the URL.
|
|
76
|
-
* @property {boolean|string} [cookieJar] - Enable a per-request cookie jar.
|
|
77
|
-
* @property {string} [acceptEncoding] - Override the `Accept-Encoding` header value.
|
|
78
|
-
* @property {string[]} [headerOrder] - Explicit header ordering for fingerprinting.
|
|
79
|
-
* @property {4|6} [dnsFamily] - Force IPv4 (`4`) or IPv6 (`6`) DNS resolution.
|
|
80
|
-
* @property {boolean} [stream] - Return a streaming response body.
|
|
81
|
-
* @property {Logger} [logger] - Logger instance for request-scoped diagnostics.
|
|
55
|
+
* Full request descriptor for a single HTTP request, including URL, method,
|
|
56
|
+
* headers, body, TLS fingerprinting, proxy, caching, and timeout options.
|
|
82
57
|
*/
|
|
83
58
|
export interface NLcURLRequest {
|
|
84
59
|
url: string;
|
|
@@ -96,7 +71,7 @@ export interface NLcURLRequest {
|
|
|
96
71
|
insecure?: boolean;
|
|
97
72
|
proxy?: string;
|
|
98
73
|
proxyAuth?: [string, string];
|
|
99
|
-
httpVersion?: "1.1" | "2";
|
|
74
|
+
httpVersion?: "1.1" | "2" | "3";
|
|
100
75
|
baseURL?: string;
|
|
101
76
|
params?: Record<string, string | number | boolean>;
|
|
102
77
|
cookieJar?: boolean | string | CookieJar;
|
|
@@ -106,16 +81,30 @@ export interface NLcURLRequest {
|
|
|
106
81
|
stream?: boolean;
|
|
107
82
|
logger?: Logger;
|
|
108
83
|
tls?: TLSOptions;
|
|
84
|
+
dns?: DNSConfig;
|
|
85
|
+
ech?: ECHOptions;
|
|
86
|
+
onUploadProgress?: ProgressCallback;
|
|
87
|
+
onDownloadProgress?: ProgressCallback;
|
|
88
|
+
throwOnError?: boolean;
|
|
89
|
+
cache?: CacheMode;
|
|
90
|
+
range?: string;
|
|
91
|
+
auth?: AuthConfig;
|
|
92
|
+
onEarlyHints?: EarlyHintsCallback;
|
|
93
|
+
expect100Continue?: boolean;
|
|
94
|
+
compressBody?: RequestEncoding;
|
|
95
|
+
methodOverride?: "QUERY";
|
|
109
96
|
}
|
|
110
97
|
/**
|
|
111
|
-
*
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
98
|
+
* Represents a single server-sent event from an SSE stream.
|
|
99
|
+
*/
|
|
100
|
+
export interface ServerSentEvent {
|
|
101
|
+
event: string;
|
|
102
|
+
data: string;
|
|
103
|
+
id: string;
|
|
104
|
+
retry?: number;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Configuration for automatic request retry behavior.
|
|
119
108
|
*/
|
|
120
109
|
export interface RetryConfig {
|
|
121
110
|
count: number;
|
|
@@ -125,28 +114,7 @@ export interface RetryConfig {
|
|
|
125
114
|
retryOn?: (error: Error | null, statusCode?: number) => boolean;
|
|
126
115
|
}
|
|
127
116
|
/**
|
|
128
|
-
* Session-level
|
|
129
|
-
* {@link NLcURLSession}. Individual request options always take precedence.
|
|
130
|
-
*
|
|
131
|
-
* @typedef {Object} NLcURLSessionConfig
|
|
132
|
-
* @property {string} [baseURL] - Base URL prepended to relative request URLs.
|
|
133
|
-
* @property {Record<string,string>} [headers] - Headers merged into every request.
|
|
134
|
-
* @property {number|TimeoutConfig} [timeout] - Default timeout applied to all requests.
|
|
135
|
-
* @property {string} [impersonate] - Default browser profile for fingerprinting.
|
|
136
|
-
* @property {string} [ja3] - Default JA3 fingerprint string.
|
|
137
|
-
* @property {string} [akamai] - Default Akamai HTTP/2 fingerprint.
|
|
138
|
-
* @property {boolean} [stealth] - Use the stealth TLS engine by default.
|
|
139
|
-
* @property {string} [proxy] - Default proxy URL.
|
|
140
|
-
* @property {[string,string]} [proxyAuth] - Default proxy credentials.
|
|
141
|
-
* @property {boolean} [followRedirects=true] - Follow redirects by default.
|
|
142
|
-
* @property {number} [maxRedirects=20] - Default maximum redirect count.
|
|
143
|
-
* @property {boolean} [insecure] - Skip TLS verification by default.
|
|
144
|
-
* @property {'1.1'|'2'} [httpVersion] - Force an HTTP protocol version for all requests.
|
|
145
|
-
* @property {boolean|string} [cookieJar] - Persistent cookie jar for the session.
|
|
146
|
-
* @property {Partial<RetryConfig>} [retry] - Automatic retry configuration.
|
|
147
|
-
* @property {string} [acceptEncoding] - Default `Accept-Encoding` header value.
|
|
148
|
-
* @property {4|6} [dnsFamily] - Force IPv4 or IPv6 for DNS resolution.
|
|
149
|
-
* @property {Logger} [logger] - Logger instance for session-scoped diagnostics.
|
|
117
|
+
* Session-level configuration shared across all requests in a session.
|
|
150
118
|
*/
|
|
151
119
|
export interface NLcURLSessionConfig {
|
|
152
120
|
baseURL?: string;
|
|
@@ -161,12 +129,22 @@ export interface NLcURLSessionConfig {
|
|
|
161
129
|
followRedirects?: boolean;
|
|
162
130
|
maxRedirects?: number;
|
|
163
131
|
insecure?: boolean;
|
|
164
|
-
httpVersion?: "1.1" | "2";
|
|
132
|
+
httpVersion?: "1.1" | "2" | "3";
|
|
165
133
|
cookieJar?: boolean | string | CookieJar;
|
|
166
134
|
retry?: Partial<RetryConfig>;
|
|
167
135
|
acceptEncoding?: string;
|
|
168
136
|
dnsFamily?: 4 | 6;
|
|
169
137
|
logger?: Logger;
|
|
170
138
|
tls?: TLSOptions;
|
|
139
|
+
throwOnError?: boolean;
|
|
140
|
+
onUploadProgress?: ProgressCallback;
|
|
141
|
+
onDownloadProgress?: ProgressCallback;
|
|
142
|
+
cacheConfig?: CacheConfig;
|
|
143
|
+
hsts?: HSTSConfig;
|
|
144
|
+
dns?: DNSConfig;
|
|
145
|
+
ech?: ECHOptions;
|
|
146
|
+
altSvc?: boolean;
|
|
147
|
+
auth?: AuthConfig;
|
|
148
|
+
compressBody?: RequestEncoding;
|
|
171
149
|
}
|
|
172
150
|
//# sourceMappingURL=request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/core/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../src/core/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAA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{ Readable } from "node:stream";
|
|
3
3
|
/**
|
|
4
|
-
* Metadata about the
|
|
5
|
-
*
|
|
6
|
-
* @typedef {Object} ResponseMeta
|
|
7
|
-
* @property {string} url - The final URL after all redirects.
|
|
8
|
-
* @property {HttpMethod} method - The HTTP method used for the request.
|
|
9
|
-
* @property {Record<string,string>} headers - The request headers that were sent.
|
|
10
|
-
* @property {string} [command] - An optional cURL-equivalent command string for debugging.
|
|
4
|
+
* Metadata about the request that produced a given response.
|
|
11
5
|
*/
|
|
12
6
|
export interface ResponseMeta {
|
|
13
7
|
url: string;
|
|
14
8
|
method: HttpMethod;
|
|
15
9
|
headers: Record<string, string>;
|
|
16
10
|
command?: string;
|
|
11
|
+
tlsVersion?: string;
|
|
12
|
+
tlsCipher?: string;
|
|
13
|
+
alpnProtocol?: string;
|
|
17
14
|
}
|
|
18
15
|
/**
|
|
19
|
-
*
|
|
20
|
-
* convenience accessors for common
|
|
21
|
-
* header inspection.
|
|
16
|
+
* Encapsulates an HTTP response with status, headers, body, timing data,
|
|
17
|
+
* and convenience accessors for common header values and body parsing.
|
|
22
18
|
*
|
|
23
|
-
* @
|
|
19
|
+
* @class
|
|
20
|
+
* @template T - The expected JSON body type.
|
|
24
21
|
*/
|
|
25
22
|
export declare class NLcURLResponse<T = unknown> {
|
|
26
|
-
/** HTTP status code
|
|
23
|
+
/** The HTTP status code. */
|
|
27
24
|
readonly status: number;
|
|
28
|
-
/** HTTP
|
|
25
|
+
/** The HTTP reason phrase. */
|
|
29
26
|
readonly statusText: string;
|
|
30
|
-
/**
|
|
27
|
+
/** Response headers as a case-insensitive key-value map. */
|
|
31
28
|
readonly headers: Record<string, string>;
|
|
32
|
-
/**
|
|
29
|
+
/** Raw header pairs preserving original casing and duplicates. */
|
|
33
30
|
readonly rawHeaders: Array<[string, string]>;
|
|
34
|
-
/**
|
|
31
|
+
/** The full response body as a Buffer. */
|
|
35
32
|
readonly rawBody: Buffer;
|
|
36
|
-
/**
|
|
33
|
+
/** A readable stream for streaming responses, or `null` for buffered responses. */
|
|
37
34
|
readonly body: Readable | null;
|
|
38
|
-
/** HTTP
|
|
35
|
+
/** The negotiated HTTP version (e.g. "1.1", "2"). */
|
|
39
36
|
readonly httpVersion: string;
|
|
40
|
-
/**
|
|
37
|
+
/** The final URL after any redirects. */
|
|
41
38
|
readonly url: string;
|
|
42
|
-
/**
|
|
39
|
+
/** The number of redirects followed to reach this response. */
|
|
43
40
|
readonly redirectCount: number;
|
|
44
|
-
/**
|
|
41
|
+
/** Timing measurements for each request phase. */
|
|
45
42
|
readonly timings: RequestTimings;
|
|
46
43
|
/** Metadata about the originating request. */
|
|
47
44
|
readonly request: ResponseMeta;
|
|
48
45
|
private _json;
|
|
49
46
|
private _text;
|
|
50
47
|
/**
|
|
51
|
-
* Creates a new NLcURLResponse
|
|
48
|
+
* Creates a new NLcURLResponse from the provided initialization fields.
|
|
52
49
|
*
|
|
53
|
-
* @param {Object}
|
|
54
|
-
* @param {number} init.status - HTTP status code.
|
|
55
|
-
* @param {string} init.statusText - HTTP status text.
|
|
56
|
-
* @param {Record<string,string>} init.headers - Normalized response headers.
|
|
57
|
-
* @param {Array<[string,string]>} [init.rawHeaders] - Raw header pairs; defaults to entries of `headers`.
|
|
58
|
-
* @param {Buffer} init.rawBody - Fully buffered response body.
|
|
59
|
-
* @param {Readable|null} [init.body] - Streaming body, or `null`.
|
|
60
|
-
* @param {string} init.httpVersion - Protocol version string.
|
|
61
|
-
* @param {string} init.url - Final URL after redirects.
|
|
62
|
-
* @param {number} init.redirectCount - Number of redirects followed.
|
|
63
|
-
* @param {RequestTimings} init.timings - Lifecycle timing measurements.
|
|
64
|
-
* @param {ResponseMeta} init.request - Originating request metadata.
|
|
50
|
+
* @param {Object} init - Response initialization fields.
|
|
65
51
|
*/
|
|
66
52
|
constructor(init: {
|
|
67
53
|
status: number;
|
|
@@ -77,55 +63,74 @@ export declare class NLcURLResponse<T = unknown> {
|
|
|
77
63
|
request: ResponseMeta;
|
|
78
64
|
});
|
|
79
65
|
/**
|
|
80
|
-
* Returns `true`
|
|
81
|
-
* range, `false` otherwise.
|
|
66
|
+
* Returns `true` if the response status is in the 2xx range.
|
|
82
67
|
*
|
|
83
68
|
* @returns {boolean} Whether the response indicates success.
|
|
84
69
|
*/
|
|
85
70
|
get ok(): boolean;
|
|
86
71
|
/**
|
|
87
|
-
* Decodes the raw body as a UTF-8 string
|
|
88
|
-
* memoized after the first call.
|
|
72
|
+
* Decodes the raw body as a UTF-8 string. Throws if the response is streaming.
|
|
89
73
|
*
|
|
90
|
-
* @returns {string} The response body
|
|
91
|
-
* @throws {Error} If the response
|
|
74
|
+
* @returns {string} The response body as text.
|
|
75
|
+
* @throws {Error} If the response is a streaming response.
|
|
92
76
|
*/
|
|
93
77
|
text(): string;
|
|
94
78
|
/**
|
|
95
|
-
* Parses the
|
|
96
|
-
* memoized after the first call.
|
|
79
|
+
* Parses the response body as JSON. Throws if the response is streaming.
|
|
97
80
|
*
|
|
98
|
-
* @template R -
|
|
99
|
-
* @returns {R} The JSON
|
|
100
|
-
* @throws {Error} If the response
|
|
81
|
+
* @template R - The expected parsed type.
|
|
82
|
+
* @returns {R} The parsed JSON value.
|
|
83
|
+
* @throws {Error} If the response is a streaming response.
|
|
101
84
|
* @throws {SyntaxError} If the body is not valid JSON.
|
|
102
|
-
*
|
|
103
|
-
* @example
|
|
104
|
-
* const data = response.json<{ id: number; name: string }>();
|
|
105
|
-
* console.log(data.id);
|
|
106
85
|
*/
|
|
107
86
|
json<R = T>(): R;
|
|
108
87
|
/**
|
|
109
|
-
* Returns the
|
|
110
|
-
* length when the header is absent or unparseable.
|
|
88
|
+
* Returns the Content-Length header value, or the raw body length as a fallback.
|
|
111
89
|
*
|
|
112
90
|
* @returns {number} The content length in bytes.
|
|
113
91
|
*/
|
|
114
92
|
get contentLength(): number;
|
|
115
93
|
/**
|
|
116
|
-
* Returns the
|
|
117
|
-
* string when the header is absent.
|
|
94
|
+
* Returns the Content-Type header value.
|
|
118
95
|
*
|
|
119
|
-
* @returns {string} The
|
|
96
|
+
* @returns {string} The content type, or an empty string if absent.
|
|
120
97
|
*/
|
|
121
98
|
get contentType(): string;
|
|
122
99
|
/**
|
|
123
|
-
* Returns
|
|
124
|
-
*
|
|
125
|
-
*
|
|
100
|
+
* Returns the ETag header value, if present.
|
|
101
|
+
*
|
|
102
|
+
* @returns {string|undefined} The entity tag.
|
|
103
|
+
*/
|
|
104
|
+
get etag(): string | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Returns the Last-Modified header value, if present.
|
|
107
|
+
*
|
|
108
|
+
* @returns {string|undefined} The last modified date string.
|
|
109
|
+
*/
|
|
110
|
+
get lastModified(): string | undefined;
|
|
111
|
+
/**
|
|
112
|
+
* Returns the Cache-Control header value, if present.
|
|
113
|
+
*
|
|
114
|
+
* @returns {string|undefined} The cache control directive string.
|
|
115
|
+
*/
|
|
116
|
+
get cacheControl(): string | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* Returns the Content-Range header value, if present.
|
|
119
|
+
*
|
|
120
|
+
* @returns {string|undefined} The content range descriptor.
|
|
121
|
+
*/
|
|
122
|
+
get contentRange(): string | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* Returns the Accept-Ranges header value, if present.
|
|
125
|
+
*
|
|
126
|
+
* @returns {string|undefined} The accepted range unit.
|
|
127
|
+
*/
|
|
128
|
+
get acceptRanges(): string | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* Retrieves all values for a given header name from the raw headers array.
|
|
126
131
|
*
|
|
127
|
-
* @param {string} name - The
|
|
128
|
-
* @returns {string[]} All
|
|
132
|
+
* @param {string} name - The header name (case-insensitive).
|
|
133
|
+
* @returns {string[]} All values for the specified header.
|
|
129
134
|
*/
|
|
130
135
|
getAll(name: string): string[];
|
|
131
136
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../src/core/response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE;CAI/B"}
|
package/dist/core/response.js
CHANGED
|
@@ -1,50 +1,39 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* convenience accessors for common
|
|
4
|
-
* header inspection.
|
|
2
|
+
* Encapsulates an HTTP response with status, headers, body, timing data,
|
|
3
|
+
* and convenience accessors for common header values and body parsing.
|
|
5
4
|
*
|
|
6
|
-
* @
|
|
5
|
+
* @class
|
|
6
|
+
* @template T - The expected JSON body type.
|
|
7
7
|
*/
|
|
8
8
|
export class NLcURLResponse {
|
|
9
|
-
/** HTTP status code
|
|
9
|
+
/** The HTTP status code. */
|
|
10
10
|
status;
|
|
11
|
-
/** HTTP
|
|
11
|
+
/** The HTTP reason phrase. */
|
|
12
12
|
statusText;
|
|
13
|
-
/**
|
|
13
|
+
/** Response headers as a case-insensitive key-value map. */
|
|
14
14
|
headers;
|
|
15
|
-
/**
|
|
15
|
+
/** Raw header pairs preserving original casing and duplicates. */
|
|
16
16
|
rawHeaders;
|
|
17
|
-
/**
|
|
17
|
+
/** The full response body as a Buffer. */
|
|
18
18
|
rawBody;
|
|
19
|
-
/**
|
|
19
|
+
/** A readable stream for streaming responses, or `null` for buffered responses. */
|
|
20
20
|
body;
|
|
21
|
-
/** HTTP
|
|
21
|
+
/** The negotiated HTTP version (e.g. "1.1", "2"). */
|
|
22
22
|
httpVersion;
|
|
23
|
-
/**
|
|
23
|
+
/** The final URL after any redirects. */
|
|
24
24
|
url;
|
|
25
|
-
/**
|
|
25
|
+
/** The number of redirects followed to reach this response. */
|
|
26
26
|
redirectCount;
|
|
27
|
-
/**
|
|
27
|
+
/** Timing measurements for each request phase. */
|
|
28
28
|
timings;
|
|
29
29
|
/** Metadata about the originating request. */
|
|
30
30
|
request;
|
|
31
31
|
_json;
|
|
32
32
|
_text;
|
|
33
33
|
/**
|
|
34
|
-
* Creates a new NLcURLResponse
|
|
34
|
+
* Creates a new NLcURLResponse from the provided initialization fields.
|
|
35
35
|
*
|
|
36
|
-
* @param {Object}
|
|
37
|
-
* @param {number} init.status - HTTP status code.
|
|
38
|
-
* @param {string} init.statusText - HTTP status text.
|
|
39
|
-
* @param {Record<string,string>} init.headers - Normalized response headers.
|
|
40
|
-
* @param {Array<[string,string]>} [init.rawHeaders] - Raw header pairs; defaults to entries of `headers`.
|
|
41
|
-
* @param {Buffer} init.rawBody - Fully buffered response body.
|
|
42
|
-
* @param {Readable|null} [init.body] - Streaming body, or `null`.
|
|
43
|
-
* @param {string} init.httpVersion - Protocol version string.
|
|
44
|
-
* @param {string} init.url - Final URL after redirects.
|
|
45
|
-
* @param {number} init.redirectCount - Number of redirects followed.
|
|
46
|
-
* @param {RequestTimings} init.timings - Lifecycle timing measurements.
|
|
47
|
-
* @param {ResponseMeta} init.request - Originating request metadata.
|
|
36
|
+
* @param {Object} init - Response initialization fields.
|
|
48
37
|
*/
|
|
49
38
|
constructor(init) {
|
|
50
39
|
this.status = init.status;
|
|
@@ -60,8 +49,7 @@ export class NLcURLResponse {
|
|
|
60
49
|
this.request = init.request;
|
|
61
50
|
}
|
|
62
51
|
/**
|
|
63
|
-
* Returns `true`
|
|
64
|
-
* range, `false` otherwise.
|
|
52
|
+
* Returns `true` if the response status is in the 2xx range.
|
|
65
53
|
*
|
|
66
54
|
* @returns {boolean} Whether the response indicates success.
|
|
67
55
|
*/
|
|
@@ -69,11 +57,10 @@ export class NLcURLResponse {
|
|
|
69
57
|
return this.status >= 200 && this.status < 300;
|
|
70
58
|
}
|
|
71
59
|
/**
|
|
72
|
-
* Decodes the raw body as a UTF-8 string
|
|
73
|
-
* memoized after the first call.
|
|
60
|
+
* Decodes the raw body as a UTF-8 string. Throws if the response is streaming.
|
|
74
61
|
*
|
|
75
|
-
* @returns {string} The response body
|
|
76
|
-
* @throws {Error} If the response
|
|
62
|
+
* @returns {string} The response body as text.
|
|
63
|
+
* @throws {Error} If the response is a streaming response.
|
|
77
64
|
*/
|
|
78
65
|
text() {
|
|
79
66
|
if (this.body) {
|
|
@@ -87,17 +74,12 @@ export class NLcURLResponse {
|
|
|
87
74
|
return cached;
|
|
88
75
|
}
|
|
89
76
|
/**
|
|
90
|
-
* Parses the
|
|
91
|
-
* memoized after the first call.
|
|
77
|
+
* Parses the response body as JSON. Throws if the response is streaming.
|
|
92
78
|
*
|
|
93
|
-
* @template R -
|
|
94
|
-
* @returns {R} The JSON
|
|
95
|
-
* @throws {Error} If the response
|
|
79
|
+
* @template R - The expected parsed type.
|
|
80
|
+
* @returns {R} The parsed JSON value.
|
|
81
|
+
* @throws {Error} If the response is a streaming response.
|
|
96
82
|
* @throws {SyntaxError} If the body is not valid JSON.
|
|
97
|
-
*
|
|
98
|
-
* @example
|
|
99
|
-
* const data = response.json<{ id: number; name: string }>();
|
|
100
|
-
* console.log(data.id);
|
|
101
83
|
*/
|
|
102
84
|
json() {
|
|
103
85
|
if (this.body) {
|
|
@@ -109,8 +91,7 @@ export class NLcURLResponse {
|
|
|
109
91
|
return this._json;
|
|
110
92
|
}
|
|
111
93
|
/**
|
|
112
|
-
* Returns the
|
|
113
|
-
* length when the header is absent or unparseable.
|
|
94
|
+
* Returns the Content-Length header value, or the raw body length as a fallback.
|
|
114
95
|
*
|
|
115
96
|
* @returns {number} The content length in bytes.
|
|
116
97
|
*/
|
|
@@ -124,21 +105,58 @@ export class NLcURLResponse {
|
|
|
124
105
|
return this.rawBody.length;
|
|
125
106
|
}
|
|
126
107
|
/**
|
|
127
|
-
* Returns the
|
|
128
|
-
* string when the header is absent.
|
|
108
|
+
* Returns the Content-Type header value.
|
|
129
109
|
*
|
|
130
|
-
* @returns {string} The
|
|
110
|
+
* @returns {string} The content type, or an empty string if absent.
|
|
131
111
|
*/
|
|
132
112
|
get contentType() {
|
|
133
113
|
return this.headers["content-type"] ?? "";
|
|
134
114
|
}
|
|
135
115
|
/**
|
|
136
|
-
* Returns
|
|
137
|
-
*
|
|
138
|
-
*
|
|
116
|
+
* Returns the ETag header value, if present.
|
|
117
|
+
*
|
|
118
|
+
* @returns {string|undefined} The entity tag.
|
|
119
|
+
*/
|
|
120
|
+
get etag() {
|
|
121
|
+
return this.headers["etag"];
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Returns the Last-Modified header value, if present.
|
|
125
|
+
*
|
|
126
|
+
* @returns {string|undefined} The last modified date string.
|
|
127
|
+
*/
|
|
128
|
+
get lastModified() {
|
|
129
|
+
return this.headers["last-modified"];
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Returns the Cache-Control header value, if present.
|
|
133
|
+
*
|
|
134
|
+
* @returns {string|undefined} The cache control directive string.
|
|
135
|
+
*/
|
|
136
|
+
get cacheControl() {
|
|
137
|
+
return this.headers["cache-control"];
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Returns the Content-Range header value, if present.
|
|
141
|
+
*
|
|
142
|
+
* @returns {string|undefined} The content range descriptor.
|
|
143
|
+
*/
|
|
144
|
+
get contentRange() {
|
|
145
|
+
return this.headers["content-range"];
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Returns the Accept-Ranges header value, if present.
|
|
149
|
+
*
|
|
150
|
+
* @returns {string|undefined} The accepted range unit.
|
|
151
|
+
*/
|
|
152
|
+
get acceptRanges() {
|
|
153
|
+
return this.headers["accept-ranges"];
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Retrieves all values for a given header name from the raw headers array.
|
|
139
157
|
*
|
|
140
|
-
* @param {string} name - The
|
|
141
|
-
* @returns {string[]} All
|
|
158
|
+
* @param {string} name - The header name (case-insensitive).
|
|
159
|
+
* @returns {string[]} All values for the specified header.
|
|
142
160
|
*/
|
|
143
161
|
getAll(name) {
|
|
144
162
|
const lower = name.toLowerCase();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../src/core/response.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":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