aboutsummaryrefslogtreecommitdiff
path: root/node_modules/decompress-response/index.d.ts
blob: c0be175f906ce9f08e643bda4cbab9bd7cc5fd50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/// <reference types="node"/>
import {IncomingMessage} from 'http';

/**
Decompress a HTTP response if needed.

@param response - The HTTP incoming stream with compressed data.
@returns The decompressed HTTP response stream.

@example
```
import {http} from 'http';
import decompressResponse = require('decompress-response');

http.get('https://sindresorhus.com', response => {
	response = decompressResponse(response);
});
```
*/
declare function decompressResponse(response: IncomingMessage): IncomingMessage;

export = decompressResponse;