Wessel T 4b6cdfb428 Merge pull request #11 from fossabot/master
Add license scan report and status
2019-04-12 11:15:19 +02:00
2019-04-07 11:58:42 +01:00
2019-04-05 17:15:24 +02:00
2019-04-07 11:58:42 +01:00
2019-04-11 19:50:44 +02:00
2019-04-11 18:28:38 +01:00
2019-04-12 10:24:35 +02:00
2019-04-11 18:28:38 +01:00
2019-03-29 14:06:46 -07:00
2019-04-11 18:28:38 +01:00
2019-04-11 19:50:56 +02:00
2019-04-12 02:00:40 -07:00

Wumpfetch

FOSSA Status

A lightweight and fast Node.js HTTP client which can be used in various ways

Typings | GitHub | NPM

Installing

$ yarn add wumpfetch # Install w/ Yarn (the superior package manager)
$ npm i wumpfetch # Install w/ NPM

Usage

Code
const w = require('wumpfetch');

;(async() => {
	const r = await w('https://aws.random.cat/meow').send();

	console.log(r.json());
});
Result
$ node test.js
{ file: 'https://purr.objects-us-east-1.dream.io/i/100_-_rURSo7L.gif' }

Sending data in a JSON body to a server

Chaining methods

const w = require('wumpfetch');

;(async() => {
	const r = await w('https://my-site.com/postboi', 'POST')
		.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
		.send(); // Finish the chain by sending the rquest

	console.log(r.json()); // Returns the response in a JSON format
})();

Object

const w = require('wumpfetch');

;(async() => {
	const r = await w({
		url: 'https://my-site.com/postboi',
		data: { 'bear': 'cop' },
		method: 'POST',
		headers: { 'Authorization': 'Pablo' }
	});

	console.log(r.json());
})();

or

const w = require('wumpfetch');

;(async() => {
	const r = await w('https://my-site.com/postboi', { method: 'GET' });
	console.log(r.json());
})();

Projects using Wumpfetch

If you want your own project listed, either create a pull request or an issue with the following content:

  • Package name
  • a short description of your package
  • NPM link (🔩)
  • Packagephobia link (⚖)
  • GitHub repository link (📂)
  • Optional: A website link (👾)
Project Name Short description Links
boats.js The official discord.boats API wrapper for NodeJS 🔩 📂 👾
qtradio.js API wrapper for qtradio.moe made in JavaScript 🔩 📂 👾
cafebot.js CafeBot.xyz API Wrapper made in JS 🔩 📂 👾

License

FOSSA Status

Description
🚀🔗 A modern, lightweight, fast and easy to use Node.js HTTP client
Readme MIT 163 KiB
Languages
JavaScript 96.9%
TypeScript 3.1%