aboutsummaryrefslogtreecommitdiff
path: root/node_modules/caw/readme.md
blob: 447191f3f9d9bc8a437f3168fc411a55b1f866d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# caw [![Build Status](https://travis-ci.org/kevva/caw.svg?branch=master)](https://travis-ci.org/kevva/caw)

> Construct HTTP/HTTPS agents for tunneling proxies


## Install

```
$ npm install caw
```


## Usage

```js
const caw = require('caw');
const got = require('got');

got('todomvc.com', {
	agent: caw()
}, () => {});
```


## API

### caw([proxy], [options])

#### proxy

Type: `string`

Proxy URL. If not set, it'll try getting it using [`get-proxy`](https://github.com/kevva/get-proxy).

#### options

Type: `Object`

Besides the options below, you can pass in options allowed in [tunnel-agent](https://github.com/request/tunnel-agent).

##### protocol

Type: `string`<br>
Default: `http`

Endpoint protocol.


## License

MIT © [Kevin Mårtensson](https://github.com/kevva)