File tree Expand file tree Collapse file tree 4 files changed +17
-5
lines changed Expand file tree Collapse file tree 4 files changed +17
-5
lines changed Original file line number Diff line number Diff line change
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ ## 1.1.0 - 2018-01-30
5
+
6
+ ### Added
7
+ - Changelog
8
+
9
+ ### Changed
10
+ - module.exports now returns only a function.
11
+ Now you must create a new instance, it prevents from overwriting the default options.
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ $ npm install curl-request --save
22
22
After installing the ` npm ` package you can now start simplifying requests like so:
23
23
24
24
``` js
25
- const curl = require (' curl-request' );
25
+ const curl = new ( require ( ' curl-request' ))( );
26
26
```
27
27
28
28
If you have problems installing the dependencies, use this to build it from source:
@@ -34,7 +34,7 @@ $ npm install node-libcurl --build-from-source
34
34
## Usage
35
35
36
36
``` js
37
- const curl = require ( ' curl-request' );
37
+ const curl = new ( require ( ' curl-request' ))( );
38
38
39
39
curl .setHeaders ([
40
40
' user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36'
@@ -107,6 +107,7 @@ curl.newTorIdentity();
107
107
curl .default .verbose = true ;
108
108
```
109
109
110
+ ##
110
111
## Contributing
111
112
112
113
1 . Fork it
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ const Curl = require('node-libcurl').Curl;
2
2
const Net = require ( 'net' ) ;
3
3
const querystring = require ( 'querystring' ) ;
4
4
5
- module . exports = ( function ( ) {
5
+ module . exports = function ( ) {
6
6
7
7
this [ 'default' ] = {
8
8
torControlHost : 'localhost' ,
@@ -174,4 +174,4 @@ module.exports = (function () {
174
174
} ;
175
175
176
176
return this ;
177
- } ) ( ) ;
177
+ } ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " curl-request" ,
3
- "version" : " 1.0.4 " ,
3
+ "version" : " 1.1.0 " ,
4
4
"description" : " cURL node wrapper with promises. Support http, https and proxies and more. All cURL options. Tor-Proxy support." ,
5
5
"main" : " index.js" ,
6
6
"repository" : {
You can’t perform that action at this time.
0 commit comments