hyperttp 0.4.0 → 0.4.2
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/Hyperttp/Client/HyperClient.d.ts +125 -1
- package/Hyperttp/Client/HyperClient.d.ts.map +1 -1
- package/Hyperttp/Client/HyperClient.js +178 -70
- package/Hyperttp/Client/HyperClient.js.map +1 -1
- package/Hyperttp/Request.d.ts +168 -3
- package/Hyperttp/Request.d.ts.map +1 -1
- package/Hyperttp/Request.js +174 -4
- package/Hyperttp/Request.js.map +1 -1
- package/Hyperttp/Utils/RequestBuilder.d.ts +67 -90
- package/Hyperttp/Utils/RequestBuilder.d.ts.map +1 -1
- package/Hyperttp/Utils/RequestBuilder.js +99 -106
- package/Hyperttp/Utils/RequestBuilder.js.map +1 -1
- package/Hyperttp/index.d.ts +1 -0
- package/Hyperttp/index.d.ts.map +1 -1
- package/Hyperttp/index.js +1 -1
- package/Hyperttp/index.js.map +1 -1
- package/README.md +119 -133
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +6 -6
|
@@ -11,34 +11,158 @@ declare module "@hyperttp/core" {
|
|
|
11
11
|
type StreamResponseBody = ReadableStream<Uint8Array> & {
|
|
12
12
|
dump?: () => Promise<void>;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* @ru Основной клиент для выполнения HTTP-запросов с поддержкой плагинов (сериализация, кэширование, очередь, rate limit, метрики, парсинг, перехватчики).
|
|
16
|
+
* @en Main HTTP client supporting plugins (serialization, caching, queue, rate limiting, metrics, parsing, interceptors).
|
|
17
|
+
*/
|
|
14
18
|
export declare class HyperClient {
|
|
15
19
|
private readonly _engine;
|
|
16
20
|
private readonly _config;
|
|
21
|
+
/**
|
|
22
|
+
* @ru Создаёт экземпляр HyperClient с расширенными возможностями.
|
|
23
|
+
* @en Creates a HyperClient instance with enhanced capabilities.
|
|
24
|
+
* @param config - Client configuration (base URL, timeouts, network, logger, etc.).
|
|
25
|
+
*/
|
|
17
26
|
constructor(config?: HttpClientOptions);
|
|
27
|
+
/**
|
|
28
|
+
* @ru Возвращает текущий транспортный экземпляр (или null, если он ещё не инициализирован).
|
|
29
|
+
* @en Returns the current transport instance (or null if not yet initialized).
|
|
30
|
+
*/
|
|
31
|
+
getTransportName(): Promise<string>;
|
|
18
32
|
private wrapRequest;
|
|
19
33
|
private extractBody;
|
|
20
34
|
private static extractBodyFromResponse;
|
|
21
35
|
private static formatHeadResponse;
|
|
22
36
|
private static formatStreamResponse;
|
|
23
|
-
|
|
37
|
+
/**
|
|
38
|
+
* @ru Выполняет GET-запрос и возвращает распарсенный ответ (тело ответа).
|
|
39
|
+
* @en Performs a GET request and returns the parsed response body.
|
|
40
|
+
* @param req - Request URL or RequestInterface object.
|
|
41
|
+
* @param responseType - Desired response type ('auto', 'json', 'text', 'stream', 'buffer').
|
|
42
|
+
* @param signal - Optional abort signal.
|
|
43
|
+
* @returns Promise with the response body (type depends on responseType).
|
|
44
|
+
*/
|
|
24
45
|
get<T>(req: RequestInterface | string, responseType?: ResponseType, signal?: AbortSignal): Promise<T>;
|
|
46
|
+
/**
|
|
47
|
+
* @ru Выполняет POST-запрос и возвращает распарсенный ответ (тело ответа).
|
|
48
|
+
* @en Performs a POST request and returns the parsed response body.
|
|
49
|
+
* @param req - Request URL or RequestInterface object.
|
|
50
|
+
* @param responseType - Desired response type ('auto', 'json', 'text', 'stream', 'buffer').
|
|
51
|
+
* @param body - Request body data (overrides body from req).
|
|
52
|
+
* @param signal - Optional abort signal.
|
|
53
|
+
* @returns Promise with the response body.
|
|
54
|
+
*/
|
|
25
55
|
post<T = unknown>(req: RequestInterface | string, responseType?: ResponseType, body?: RequestBodyData, signal?: AbortSignal): Promise<T>;
|
|
56
|
+
/**
|
|
57
|
+
* @ru Выполняет PUT-запрос и возвращает распарсенный ответ (тело ответа).
|
|
58
|
+
* @en Performs a PUT request and returns the parsed response body.
|
|
59
|
+
* @param req - Request URL or RequestInterface object.
|
|
60
|
+
* @param responseType - Desired response type ('auto', 'json', 'text', 'stream', 'buffer').
|
|
61
|
+
* @param body - Request body data (overrides body from req).
|
|
62
|
+
* @param signal - Optional abort signal.
|
|
63
|
+
* @returns Promise with the response body.
|
|
64
|
+
*/
|
|
26
65
|
put<T = unknown>(req: RequestInterface | string, responseType?: ResponseType, body?: RequestBodyData, signal?: AbortSignal): Promise<T>;
|
|
66
|
+
/**
|
|
67
|
+
* @ru Выполняет PATCH-запрос и возвращает распарсенный ответ (тело ответа).
|
|
68
|
+
* @en Performs a PATCH request and returns the parsed response body.
|
|
69
|
+
* @param req - Request URL or RequestInterface object.
|
|
70
|
+
* @param responseType - Desired response type ('auto', 'json', 'text', 'stream', 'buffer').
|
|
71
|
+
* @param body - Request body data (overrides body from req).
|
|
72
|
+
* @param signal - Optional abort signal.
|
|
73
|
+
* @returns Promise with the response body.
|
|
74
|
+
*/
|
|
27
75
|
patch<T = unknown>(req: RequestInterface | string, responseType?: ResponseType, body?: RequestBodyData, signal?: AbortSignal): Promise<T>;
|
|
76
|
+
/**
|
|
77
|
+
* @ru Выполняет OPTIONS-запрос и возвращает распарсенный ответ (тело ответа).
|
|
78
|
+
* @en Performs an OPTIONS request and returns the parsed response body.
|
|
79
|
+
* @param req - Request URL or RequestInterface object.
|
|
80
|
+
* @param responseType - Desired response type ('auto', 'json', 'text', 'stream', 'buffer').
|
|
81
|
+
* @param body - Request body data (overrides body from req).
|
|
82
|
+
* @param signal - Optional abort signal.
|
|
83
|
+
* @returns Promise with the response body.
|
|
84
|
+
*/
|
|
28
85
|
options<T = unknown>(req: RequestInterface | string, responseType?: ResponseType, body?: RequestBodyData, signal?: AbortSignal): Promise<T>;
|
|
86
|
+
/**
|
|
87
|
+
* @ru Выполняет DELETE-запрос и возвращает распарсенный ответ (тело ответа).
|
|
88
|
+
* @en Performs a DELETE request and returns the parsed response body.
|
|
89
|
+
* @param req - Request URL or RequestInterface object.
|
|
90
|
+
* @param responseType - Desired response type ('auto', 'json', 'text', 'stream', 'buffer').
|
|
91
|
+
* @param signal - Optional abort signal.
|
|
92
|
+
* @returns Promise with the response body.
|
|
93
|
+
*/
|
|
29
94
|
delete<T = unknown>(req: RequestInterface | string, responseType?: ResponseType, signal?: AbortSignal): Promise<T>;
|
|
95
|
+
/**
|
|
96
|
+
* @ru Выполняет HEAD-запрос и возвращает статус и заголовки (без тела).
|
|
97
|
+
* @en Performs a HEAD request and returns status and headers (no body).
|
|
98
|
+
* @param req - Request URL or RequestInterface object.
|
|
99
|
+
* @param responseType - Desired response type (ignored for HEAD, but kept for consistency).
|
|
100
|
+
* @param signal - Optional abort signal.
|
|
101
|
+
* @returns Promise with status and headers.
|
|
102
|
+
*/
|
|
30
103
|
head(req: RequestInterface | string, responseType?: ResponseType, signal?: AbortSignal): Promise<{
|
|
31
104
|
status: number;
|
|
32
105
|
headers: Record<string, string | string[]>;
|
|
33
106
|
}>;
|
|
107
|
+
/**
|
|
108
|
+
* @ru Выполняет GET-запрос и возвращает ответ в виде потока (StreamResponse). Тело ответа — ReadableStream.
|
|
109
|
+
* @en Performs a GET request and returns the response as a stream (StreamResponse). Response body is a ReadableStream.
|
|
110
|
+
* @param req - Request URL or RequestInterface object.
|
|
111
|
+
* @param signal - Optional abort signal.
|
|
112
|
+
* @returns Promise with HTTP response containing a readable stream body.
|
|
113
|
+
*/
|
|
34
114
|
stream(req: RequestInterface | string, signal?: AbortSignal): Promise<HttpResponse<StreamResponseBody>>;
|
|
115
|
+
/**
|
|
116
|
+
* @ru Создаёт построитель запроса (RequestBuilder) для удобной цепочной настройки GET-запроса.
|
|
117
|
+
* @en Creates a RequestBuilder for convenient chained GET request configuration.
|
|
118
|
+
* @param url - Base URL for the request.
|
|
119
|
+
* @returns RequestBuilder instance.
|
|
120
|
+
*/
|
|
35
121
|
request(url: string): RequestBuilder;
|
|
122
|
+
/**
|
|
123
|
+
* @ru Создаёт новый экземпляр HyperClient с расширенной конфигурацией (поверх текущей).
|
|
124
|
+
* @en Creates a new HyperClient instance with extended configuration (on top of current).
|
|
125
|
+
* @param options - Partial configuration to merge.
|
|
126
|
+
* @returns New HyperClient instance.
|
|
127
|
+
*/
|
|
36
128
|
extend(options: Partial<HttpClientOptions>): HyperClient;
|
|
129
|
+
/**
|
|
130
|
+
* @ru Алиас для extend(). Создаёт новый экземпляр HyperClient.
|
|
131
|
+
* @en Alias for extend(). Creates a new HyperClient instance.
|
|
132
|
+
* @param options - Configuration options.
|
|
133
|
+
* @returns New HyperClient instance.
|
|
134
|
+
*/
|
|
37
135
|
create(options: Partial<HttpClientOptions>): HyperClient;
|
|
136
|
+
/**
|
|
137
|
+
* @ru Уничтожает клиент, закрывая соединения и очищая ресурсы (транспорт, агенты).
|
|
138
|
+
* @en Destroys the client, closing connections and cleaning up resources (transport, agents).
|
|
139
|
+
* @returns Promise that resolves after destruction.
|
|
140
|
+
*/
|
|
38
141
|
destroy(): Promise<void>;
|
|
142
|
+
/**
|
|
143
|
+
* @ru Возвращает статистику работы клиента (если включены метрики).
|
|
144
|
+
* @en Returns client statistics (if metrics are enabled).
|
|
145
|
+
* @returns Statistics object or undefined.
|
|
146
|
+
*/
|
|
39
147
|
getStats(): Record<string, unknown> | undefined;
|
|
148
|
+
/**
|
|
149
|
+
* @ru Очищает кэш ответов (если используется плагин кэширования).
|
|
150
|
+
* @en Clears the response cache (if the caching plugin is used).
|
|
151
|
+
* @returns Void or Promise if async clearing is required.
|
|
152
|
+
*/
|
|
40
153
|
clearCache(): void | Promise<void> | undefined;
|
|
154
|
+
/**
|
|
155
|
+
* @ru Возвращает все метрики (если включен плагин метрик).
|
|
156
|
+
* @en Returns all metrics (if the metrics plugin is enabled).
|
|
157
|
+
* @returns Metrics object or undefined.
|
|
158
|
+
*/
|
|
41
159
|
getAllMetrics(): Record<string, unknown> | undefined;
|
|
160
|
+
/**
|
|
161
|
+
* @ru Возвращает конкретную метрику по ключу.
|
|
162
|
+
* @en Returns a specific metric by key.
|
|
163
|
+
* @param key - Metric key.
|
|
164
|
+
* @returns Metric value or undefined.
|
|
165
|
+
*/
|
|
42
166
|
getMetrics(key: string): unknown;
|
|
43
167
|
}
|
|
44
168
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HyperClient.d.ts","sourceRoot":"","sources":["../../../src/Hyperttp/Client/HyperClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAY5D,OAAO,QAAQ,gBAAgB,CAAC;IAC9B,UAAU,SAAS;QACjB,QAAQ,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACzC,UAAU,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QACxC,aAAa,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9C,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;KACvC;CACF;AAED,KAAK,kBAAkB,GAAG,cAAc,CAAC,UAAU,CAAC,GAAG;IACrD,IAAI,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B,CAAC;AAwBF,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAY;IACpC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;
|
|
1
|
+
{"version":3,"file":"HyperClient.d.ts","sourceRoot":"","sources":["../../../src/Hyperttp/Client/HyperClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,cAAc,EAAE,MAAM,4B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AC,kBAAkB,CAAC,CAAC;IAM5C;;;;;OAKG;IACI,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc;IAI3C;;;;;OAKG;IACI,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,WAAW;IAW/D;;;;;OAKG;IACI,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,WAAW;IAI/D;;;;OAIG;IACU,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrC;;;;OAIG;IACI,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;IAItD;;;;OAIG;IACI,UAAU,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS;IAIrD;;;;OAIG;IACI,aAAa,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;IAI3D;;;;;OAKG;IACI,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;CAGxC"}
|
|
@@ -19,17 +19,25 @@ function streamCloneHandler() {
|
|
|
19
19
|
clone: streamCloneHandler,
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* @ru Основной клиент для выполнения HTTP-запросов с поддержкой плагинов (сериализация, кэширование, очередь, rate limit, метрики, парсинг, перехватчики).
|
|
24
|
+
* @en Main HTTP client supporting plugins (serialization, caching, queue, rate limiting, metrics, parsing, interceptors).
|
|
25
|
+
*/
|
|
22
26
|
export class HyperClient {
|
|
23
27
|
_engine;
|
|
24
28
|
_config;
|
|
29
|
+
/**
|
|
30
|
+
* @ru Создаёт экземпляр HyperClient с расширенными возможностями.
|
|
31
|
+
* @en Creates a HyperClient instance with enhanced capabilities.
|
|
32
|
+
* @param config - Client configuration (base URL, timeouts, network, logger, etc.).
|
|
33
|
+
*/
|
|
25
34
|
constructor(config = defaultConfig) {
|
|
26
35
|
this._config = {
|
|
27
36
|
...defaultConfig,
|
|
28
37
|
...config,
|
|
29
|
-
network:
|
|
30
|
-
...defaultConfig.network,
|
|
31
|
-
|
|
32
|
-
},
|
|
38
|
+
network: config.network
|
|
39
|
+
? { ...defaultConfig.network, ...config.network }
|
|
40
|
+
: defaultConfig.network,
|
|
33
41
|
logger: config.logger ?? (() => { }),
|
|
34
42
|
};
|
|
35
43
|
const client = new HyperCore(this._config);
|
|
@@ -37,31 +45,38 @@ export class HyperClient {
|
|
|
37
45
|
client.use(withParser(this._config.responseConverter));
|
|
38
46
|
client.use(withQueue());
|
|
39
47
|
client.use(withRateLimit(this._config.rateLimit));
|
|
40
|
-
client.use(withInflight());
|
|
41
|
-
client.use(withCache());
|
|
48
|
+
client.use(withInflight(this._config.inflight));
|
|
49
|
+
client.use(withCache(this._config.cache));
|
|
42
50
|
client.use(withInterceptors());
|
|
43
|
-
client.use(withMetrics());
|
|
51
|
+
client.use(withMetrics(this._config.metrics));
|
|
44
52
|
this._engine = client;
|
|
45
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* @ru Возвращает текущий транспортный экземпляр (или null, если он ещё не инициализирован).
|
|
56
|
+
* @en Returns the current transport instance (or null if not yet initialized).
|
|
57
|
+
*/
|
|
58
|
+
async getTransportName() {
|
|
59
|
+
return this._engine.getTransportName();
|
|
60
|
+
}
|
|
46
61
|
wrapRequest(req, responseType, signal) {
|
|
47
62
|
const r = req;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
extractBody(req
|
|
63
|
+
return {
|
|
64
|
+
url: r.url,
|
|
65
|
+
headers: r.headers ?? EMPTY_HEADERS,
|
|
66
|
+
signal: signal ?? r.signal,
|
|
67
|
+
body: r.body ?? r.bodyData ?? r._bodyData,
|
|
68
|
+
query: r.query,
|
|
69
|
+
meta: {
|
|
70
|
+
...r.meta,
|
|
71
|
+
responseType,
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
extractBody(req) {
|
|
61
76
|
if (typeof req === "string")
|
|
62
|
-
return
|
|
77
|
+
return undefined;
|
|
63
78
|
const r = req;
|
|
64
|
-
return r.body ?? r.bodyData ?? r._bodyData
|
|
79
|
+
return r.body ?? r.bodyData ?? r._bodyData;
|
|
65
80
|
}
|
|
66
81
|
static extractBodyFromResponse(res) {
|
|
67
82
|
return res.body;
|
|
@@ -81,85 +96,146 @@ export class HyperClient {
|
|
|
81
96
|
clone: streamCloneHandler,
|
|
82
97
|
};
|
|
83
98
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
get(req, responseType = "auto", signal) {
|
|
93
|
-
const wrapped = typeof req === "string"
|
|
94
|
-
? { url: req, headers: EMPTY_HEADERS, signal, meta: { responseType } }
|
|
95
|
-
: this.wrapRequest(req, responseType, signal);
|
|
99
|
+
/**
|
|
100
|
+
* @ru Выполняет GET-запрос и возвращает распарсенный ответ (тело ответа).
|
|
101
|
+
* @en Performs a GET request and returns the parsed response body.
|
|
102
|
+
* @param req - Request URL or RequestInterface object.
|
|
103
|
+
* @param responseType - Desired response type ('auto', 'json', 'text', 'stream', 'buffer').
|
|
104
|
+
* @param signal - Optional abort signal.
|
|
105
|
+
* @returns Promise with the response body (type depends on responseType).
|
|
106
|
+
*/
|
|
107
|
+
async get(req, responseType = "auto", signal) {
|
|
96
108
|
return this._engine
|
|
97
|
-
.get(
|
|
109
|
+
.get(typeof req === "string"
|
|
110
|
+
? { url: req, headers: EMPTY_HEADERS, signal, meta: { responseType } }
|
|
111
|
+
: this.wrapRequest(req, responseType, signal), signal)
|
|
98
112
|
.then(HyperClient.extractBodyFromResponse);
|
|
99
113
|
}
|
|
100
|
-
|
|
114
|
+
/**
|
|
115
|
+
* @ru Выполняет POST-запрос и возвращает распарсенный ответ (тело ответа).
|
|
116
|
+
* @en Performs a POST request and returns the parsed response body.
|
|
117
|
+
* @param req - Request URL or RequestInterface object.
|
|
118
|
+
* @param responseType - Desired response type ('auto', 'json', 'text', 'stream', 'buffer').
|
|
119
|
+
* @param body - Request body data (overrides body from req).
|
|
120
|
+
* @param signal - Optional abort signal.
|
|
121
|
+
* @returns Promise with the response body.
|
|
122
|
+
*/
|
|
123
|
+
async post(req, responseType = "auto", body, signal) {
|
|
101
124
|
const finalBody = body ?? this.extractBody(req);
|
|
102
|
-
|
|
125
|
+
return this._engine
|
|
126
|
+
.post(typeof req === "string"
|
|
103
127
|
? { url: req, headers: EMPTY_HEADERS, signal, meta: { responseType } }
|
|
104
|
-
: this.wrapRequest(req, responseType, signal)
|
|
105
|
-
|
|
106
|
-
if (res.body instanceof ReadableStream) {
|
|
107
|
-
return new Response(res.body).text().then(HyperClient.parseJsonOrText);
|
|
108
|
-
}
|
|
109
|
-
return res.body;
|
|
110
|
-
});
|
|
128
|
+
: this.wrapRequest(req, responseType, signal), finalBody, signal)
|
|
129
|
+
.then(HyperClient.extractBodyFromResponse);
|
|
111
130
|
}
|
|
112
|
-
|
|
131
|
+
/**
|
|
132
|
+
* @ru Выполняет PUT-запрос и возвращает распарсенный ответ (тело ответа).
|
|
133
|
+
* @en Performs a PUT request and returns the parsed response body.
|
|
134
|
+
* @param req - Request URL or RequestInterface object.
|
|
135
|
+
* @param responseType - Desired response type ('auto', 'json', 'text', 'stream', 'buffer').
|
|
136
|
+
* @param body - Request body data (overrides body from req).
|
|
137
|
+
* @param signal - Optional abort signal.
|
|
138
|
+
* @returns Promise with the response body.
|
|
139
|
+
*/
|
|
140
|
+
async put(req, responseType = "auto", body, signal) {
|
|
113
141
|
const finalBody = body ?? this.extractBody(req);
|
|
114
|
-
const wrapped = typeof req === "string"
|
|
115
|
-
? { url: req, headers: EMPTY_HEADERS, signal, meta: { responseType } }
|
|
116
|
-
: this.wrapRequest(req, responseType, signal);
|
|
117
142
|
return this._engine
|
|
118
|
-
.put(
|
|
143
|
+
.put(typeof req === "string"
|
|
144
|
+
? { url: req, headers: EMPTY_HEADERS, signal, meta: { responseType } }
|
|
145
|
+
: this.wrapRequest(req, responseType, signal), finalBody, signal)
|
|
119
146
|
.then(HyperClient.extractBodyFromResponse);
|
|
120
147
|
}
|
|
121
|
-
|
|
148
|
+
/**
|
|
149
|
+
* @ru Выполняет PATCH-запрос и возвращает распарсенный ответ (тело ответа).
|
|
150
|
+
* @en Performs a PATCH request and returns the parsed response body.
|
|
151
|
+
* @param req - Request URL or RequestInterface object.
|
|
152
|
+
* @param responseType - Desired response type ('auto', 'json', 'text', 'stream', 'buffer').
|
|
153
|
+
* @param body - Request body data (overrides body from req).
|
|
154
|
+
* @param signal - Optional abort signal.
|
|
155
|
+
* @returns Promise with the response body.
|
|
156
|
+
*/
|
|
157
|
+
async patch(req, responseType = "auto", body, signal) {
|
|
122
158
|
const finalBody = body ?? this.extractBody(req);
|
|
123
|
-
const wrapped = typeof req === "string"
|
|
124
|
-
? { url: req, headers: EMPTY_HEADERS, signal, meta: { responseType } }
|
|
125
|
-
: this.wrapRequest(req, responseType, signal);
|
|
126
159
|
return this._engine
|
|
127
|
-
.patch(
|
|
160
|
+
.patch(typeof req === "string"
|
|
161
|
+
? { url: req, headers: EMPTY_HEADERS, signal, meta: { responseType } }
|
|
162
|
+
: this.wrapRequest(req, responseType, signal), finalBody, signal)
|
|
128
163
|
.then(HyperClient.extractBodyFromResponse);
|
|
129
164
|
}
|
|
130
|
-
|
|
165
|
+
/**
|
|
166
|
+
* @ru Выполняет OPTIONS-запрос и возвращает распарсенный ответ (тело ответа).
|
|
167
|
+
* @en Performs an OPTIONS request and returns the parsed response body.
|
|
168
|
+
* @param req - Request URL or RequestInterface object.
|
|
169
|
+
* @param responseType - Desired response type ('auto', 'json', 'text', 'stream', 'buffer').
|
|
170
|
+
* @param body - Request body data (overrides body from req).
|
|
171
|
+
* @param signal - Optional abort signal.
|
|
172
|
+
* @returns Promise with the response body.
|
|
173
|
+
*/
|
|
174
|
+
async options(req, responseType = "auto", body, signal) {
|
|
131
175
|
const finalBody = body ?? this.extractBody(req);
|
|
132
|
-
const wrapped = typeof req === "string"
|
|
133
|
-
? { url: req, headers: EMPTY_HEADERS, signal, meta: { responseType } }
|
|
134
|
-
: this.wrapRequest(req, responseType, signal);
|
|
135
176
|
return this._engine
|
|
136
|
-
.options(
|
|
177
|
+
.options(typeof req === "string"
|
|
178
|
+
? { url: req, headers: EMPTY_HEADERS, signal, meta: { responseType } }
|
|
179
|
+
: this.wrapRequest(req, responseType, signal), finalBody, signal)
|
|
137
180
|
.then(HyperClient.extractBodyFromResponse);
|
|
138
181
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
182
|
+
/**
|
|
183
|
+
* @ru Выполняет DELETE-запрос и возвращает распарсенный ответ (тело ответа).
|
|
184
|
+
* @en Performs a DELETE request and returns the parsed response body.
|
|
185
|
+
* @param req - Request URL or RequestInterface object.
|
|
186
|
+
* @param responseType - Desired response type ('auto', 'json', 'text', 'stream', 'buffer').
|
|
187
|
+
* @param signal - Optional abort signal.
|
|
188
|
+
* @returns Promise with the response body.
|
|
189
|
+
*/
|
|
190
|
+
async delete(req, responseType = "auto", signal) {
|
|
143
191
|
return this._engine
|
|
144
|
-
.delete(
|
|
192
|
+
.delete(typeof req === "string"
|
|
193
|
+
? { url: req, headers: EMPTY_HEADERS, signal, meta: { responseType } }
|
|
194
|
+
: this.wrapRequest(req, responseType, signal), signal)
|
|
145
195
|
.then(HyperClient.extractBodyFromResponse);
|
|
146
196
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
197
|
+
/**
|
|
198
|
+
* @ru Выполняет HEAD-запрос и возвращает статус и заголовки (без тела).
|
|
199
|
+
* @en Performs a HEAD request and returns status and headers (no body).
|
|
200
|
+
* @param req - Request URL or RequestInterface object.
|
|
201
|
+
* @param responseType - Desired response type (ignored for HEAD, but kept for consistency).
|
|
202
|
+
* @param signal - Optional abort signal.
|
|
203
|
+
* @returns Promise with status and headers.
|
|
204
|
+
*/
|
|
205
|
+
async head(req, responseType = "auto", signal) {
|
|
151
206
|
return this._engine
|
|
152
|
-
.head(
|
|
207
|
+
.head(typeof req === "string"
|
|
208
|
+
? { url: req, headers: EMPTY_HEADERS, signal, meta: { responseType } }
|
|
209
|
+
: this.wrapRequest(req, responseType, signal), signal)
|
|
153
210
|
.then(HyperClient.formatHeadResponse);
|
|
154
211
|
}
|
|
155
|
-
|
|
212
|
+
/**
|
|
213
|
+
* @ru Выполняет GET-запрос и возвращает ответ в виде потока (StreamResponse). Тело ответа — ReadableStream.
|
|
214
|
+
* @en Performs a GET request and returns the response as a stream (StreamResponse). Response body is a ReadableStream.
|
|
215
|
+
* @param req - Request URL or RequestInterface object.
|
|
216
|
+
* @param signal - Optional abort signal.
|
|
217
|
+
* @returns Promise with HTTP response containing a readable stream body.
|
|
218
|
+
*/
|
|
219
|
+
async stream(req, signal) {
|
|
156
220
|
return this._engine
|
|
157
221
|
.stream(req, signal)
|
|
158
222
|
.then(HyperClient.formatStreamResponse);
|
|
159
223
|
}
|
|
224
|
+
/**
|
|
225
|
+
* @ru Создаёт построитель запроса (RequestBuilder) для удобной цепочной настройки GET-запроса.
|
|
226
|
+
* @en Creates a RequestBuilder for convenient chained GET request configuration.
|
|
227
|
+
* @param url - Base URL for the request.
|
|
228
|
+
* @returns RequestBuilder instance.
|
|
229
|
+
*/
|
|
160
230
|
request(url) {
|
|
161
231
|
return new RequestBuilder(url, this);
|
|
162
232
|
}
|
|
233
|
+
/**
|
|
234
|
+
* @ru Создаёт новый экземпляр HyperClient с расширенной конфигурацией (поверх текущей).
|
|
235
|
+
* @en Creates a new HyperClient instance with extended configuration (on top of current).
|
|
236
|
+
* @param options - Partial configuration to merge.
|
|
237
|
+
* @returns New HyperClient instance.
|
|
238
|
+
*/
|
|
163
239
|
extend(options) {
|
|
164
240
|
return new HyperClient({
|
|
165
241
|
...this._config,
|
|
@@ -170,21 +246,53 @@ export class HyperClient {
|
|
|
170
246
|
},
|
|
171
247
|
});
|
|
172
248
|
}
|
|
249
|
+
/**
|
|
250
|
+
* @ru Алиас для extend(). Создаёт новый экземпляр HyperClient.
|
|
251
|
+
* @en Alias for extend(). Creates a new HyperClient instance.
|
|
252
|
+
* @param options - Configuration options.
|
|
253
|
+
* @returns New HyperClient instance.
|
|
254
|
+
*/
|
|
173
255
|
create(options) {
|
|
174
256
|
return this.extend(options);
|
|
175
257
|
}
|
|
258
|
+
/**
|
|
259
|
+
* @ru Уничтожает клиент, закрывая соединения и очищая ресурсы (транспорт, агенты).
|
|
260
|
+
* @en Destroys the client, closing connections and cleaning up resources (transport, agents).
|
|
261
|
+
* @returns Promise that resolves after destruction.
|
|
262
|
+
*/
|
|
176
263
|
async destroy() {
|
|
177
264
|
await this._engine.destroy();
|
|
178
265
|
}
|
|
266
|
+
/**
|
|
267
|
+
* @ru Возвращает статистику работы клиента (если включены метрики).
|
|
268
|
+
* @en Returns client statistics (if metrics are enabled).
|
|
269
|
+
* @returns Statistics object or undefined.
|
|
270
|
+
*/
|
|
179
271
|
getStats() {
|
|
180
272
|
return this._engine.getStats?.();
|
|
181
273
|
}
|
|
274
|
+
/**
|
|
275
|
+
* @ru Очищает кэш ответов (если используется плагин кэширования).
|
|
276
|
+
* @en Clears the response cache (if the caching plugin is used).
|
|
277
|
+
* @returns Void or Promise if async clearing is required.
|
|
278
|
+
*/
|
|
182
279
|
clearCache() {
|
|
183
280
|
return this._engine.clearCache?.();
|
|
184
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* @ru Возвращает все метрики (если включен плагин метрик).
|
|
284
|
+
* @en Returns all metrics (if the metrics plugin is enabled).
|
|
285
|
+
* @returns Metrics object or undefined.
|
|
286
|
+
*/
|
|
185
287
|
getAllMetrics() {
|
|
186
288
|
return this._engine.getAllMetrics?.();
|
|
187
289
|
}
|
|
290
|
+
/**
|
|
291
|
+
* @ru Возвращает конкретную метрику по ключу.
|
|
292
|
+
* @en Returns a specific metric by key.
|
|
293
|
+
* @param key - Metric key.
|
|
294
|
+
* @returns Metric value or undefined.
|
|
295
|
+
*/
|
|
188
296
|
getMetrics(key) {
|
|
189
297
|
return this._engine.getMetrics?.(key);
|
|
190
298
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HyperClient.js","sourceRoot":"","sources":["../../../src/Hyperttp/Client/HyperClient.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAe9C,MAAM,aAAa,GAAoC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEzE,SAAS,kBAAkB;IAGzB,OAAO;QACL,MAAM,EAAE,IAAI,CAAC,MAAM;QACnB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,KAAK,EAAE,kBAAkB;KAC1B,CAAC;AACJ,CAAC;AAUD,MAAM,OAAO,WAAW;IACL,OAAO,CAAY;IACnB,OAAO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