mirror of
https://github.com/Wessel/wumpfetch.git
synced 2026-07-25 17:40:53 +02:00
More Improvements (see full info)
Here's what I did and why I did it: * Remove README.md information about why use Wumpfetch - Users already know it's light from the start and from package phobia, no point adding extra unneeded information. * Made gulpfile.js lighter - Made it like the other files * Edit LICENSE - There was an unneeded gap * Index.js modifications - No longer does it hard code the package name and URL, making life easier for people forking it or using it in business. Also changed request to req to make it lighter! * .gitignore edit - Removed unneeded "/" * WumpRequest.js Improvements - Package name and URL are also no longer hard coded here, renamed consts to decrease file size. Now under 10kb!
This commit is contained in:
11
README.md
11
README.md
@@ -36,7 +36,7 @@ const w = require('wumpfetch');
|
||||
.timeout(1000) // Set a 1s timeout
|
||||
.query('video', 'wumpboye') // Add a query
|
||||
.header({ 'Authorization': 'Pablito' }) // Set a header
|
||||
.body({ x: 'y', z: 1, beep: 'boop', chocolate: true }) // Send a json body
|
||||
.body({ x: 'y', z: 1, beep: 'boop', chocolate: true }) // Send a JSON body
|
||||
.send(); // Finish the chain by sending the rquest
|
||||
|
||||
console.log(r.json()); // Returns the response in a JSON format
|
||||
@@ -51,9 +51,7 @@ const w = require('wumpfetch');
|
||||
url: 'https://my-site.com/postboi',
|
||||
data: { 'bear': 'cop' },
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Authorization': 'Pablo'
|
||||
}
|
||||
headers: { 'Authorization': 'Pablo' }
|
||||
});
|
||||
|
||||
console.log(r.json());
|
||||
@@ -68,8 +66,3 @@ const w = require('wumpfetch');
|
||||
console.log(r.json());
|
||||
})();
|
||||
```
|
||||
|
||||
### Why use Wumpfetch?
|
||||
Wumpfetch is a lightweight and fast request library comparing to other packages such as request which is 4.46mb!
|
||||
<br>
|
||||
[](https://packagephobia.now.sh/result?p=wumpfetch) (6.2kb concatenated and 4.4kb minified, both in **/dest**)
|
||||
|
||||
Reference in New Issue
Block a user