Skip to content

Commit 96f0c6a

Browse files
committed
first commit
0 parents  commit 96f0c6a

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Use isomorphic fetch behind a proxy
2+
3+
4+
A wrapper of [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) that can be use behind a proxy.
5+
6+
It detect standard environment variables (HTTP_PROXY, https_proxy, etc.) to choose and use the proxy.
7+
8+
Unlike many similar packages, this one does not use tunnel in HTTP, like [request](https://github.com/request/request), like browsers.
9+
10+
11+
# Example
12+
13+
```javascript
14+
15+
import fetch from 'fetch-with-proxy';
16+
17+
const url = 'https://nodejs.org/';
18+
fetch(url)
19+
.then((response) => response.text());
20+
.then(console.log)
21+
.catch(console.error)
22+
23+
24+
```
25+
26+
# Installation
27+
28+
With [npm](http://npmjs.org):
29+
30+
$ npm install fetch-with-proxy
31+
32+
# Tests
33+
34+
Use [mocha](https://github.com/visionmedia/mocha) to run the tests.
35+
36+
$ mocha test
37+
38+
# Environment variables
39+
40+
* HTTP_PROXY
41+
* http_proxy
42+
* HTTPS_PROXY
43+
* http_proxy
44+
45+
# API Documentation
46+
47+
see https://github.com/matthew-andrews/isomorphic-fetch
48+
49+
50+
# Related projects
51+
52+
* https://github.com/rvagg/through2
53+
* https://github.com/dominictarr/event-stream
54+
* https://github.com/ZJONSSON/streamz
55+
* https://github.com/ZJONSSON/etl
56+
* https://github.com/chbrown/streaming
57+
58+
59+
# License
60+
61+
[MIT/X11](https://github.com/touv/node-ezs/blob/master/LICENSE)
62+

0 commit comments

Comments
 (0)