@e-mc/request 0.11.8 → 0.11.9

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 CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Interface
11
11
 
12
- * [View Source](https://www.unpkg.com/@e-mc/types@0.11.8/lib/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.11.9/lib/index.d.ts)
13
13
 
14
14
  ```typescript
15
15
  import type { IModule, ModuleConstructor } from "./index";
@@ -209,9 +209,9 @@ instance.get("http://hostname/path/config.yml", options).then(data => {
209
209
 
210
210
  ## References
211
211
 
212
- - https://www.unpkg.com/@e-mc/types@0.11.8/lib/http.d.ts
213
- - https://www.unpkg.com/@e-mc/types@0.11.8/lib/request.d.ts
214
- - https://www.unpkg.com/@e-mc/types@0.11.8/lib/settings.d.ts
212
+ - https://www.unpkg.com/@e-mc/types@0.11.9/lib/http.d.ts
213
+ - https://www.unpkg.com/@e-mc/types@0.11.9/lib/request.d.ts
214
+ - https://www.unpkg.com/@e-mc/types@0.11.9/lib/settings.d.ts
215
215
 
216
216
  * https://www.npmjs.com/package/@types/node
217
217
 
@@ -292,6 +292,11 @@ class HttpAdapter {
292
292
  }
293
293
  });
294
294
  }
295
+ if (opts.trailers) {
296
+ this.client.once('trailers', (trailers) => {
297
+ opts.trailers.call(this.client, trailers);
298
+ });
299
+ }
295
300
  this.client.once('end', () => {
296
301
  if (this.closed || this.aborted) {
297
302
  return;
package/index.js CHANGED
@@ -1664,6 +1664,7 @@ class Request extends module_1 {
1664
1664
  request.emit('error', err);
1665
1665
  })
1666
1666
  .once('end', () => {
1667
+ request.emit('trailers', response.trailers);
1667
1668
  request.emit('end');
1668
1669
  });
1669
1670
  if (expectContinue) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/request",
3
- "version": "0.11.8",
3
+ "version": "0.11.9",
4
4
  "description": "Request constructor for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -20,8 +20,8 @@
20
20
  "license": "BSD-3-Clause",
21
21
  "homepage": "https://github.com/anpham6/e-mc#readme",
22
22
  "dependencies": {
23
- "@e-mc/module": "0.11.8",
24
- "@e-mc/types": "0.11.8",
23
+ "@e-mc/module": "0.11.9",
24
+ "@e-mc/types": "0.11.9",
25
25
  "combined-stream": "^1.0.8",
26
26
  "js-yaml": "^4.1.0",
27
27
  "picomatch": "^4.0.2",