You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme.md 786B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # caw [![Build Status](https://travis-ci.org/kevva/caw.svg?branch=master)](https://travis-ci.org/kevva/caw)
  2. > Construct HTTP/HTTPS agents for tunneling proxies
  3. ## Install
  4. ```
  5. $ npm install caw
  6. ```
  7. ## Usage
  8. ```js
  9. const caw = require('caw');
  10. const got = require('got');
  11. got('todomvc.com', {
  12. agent: caw()
  13. }, () => {});
  14. ```
  15. ## API
  16. ### caw([proxy], [options])
  17. #### proxy
  18. Type: `string`
  19. Proxy URL. If not set, it'll try getting it using [`get-proxy`](https://github.com/kevva/get-proxy).
  20. #### options
  21. Type: `Object`
  22. Besides the options below, you can pass in options allowed in [tunnel-agent](https://github.com/request/tunnel-agent).
  23. ##### protocol
  24. Type: `string`<br>
  25. Default: `http`
  26. Endpoint protocol.
  27. ## License
  28. MIT © [Kevin Mårtensson](https://github.com/kevva)