Skip to content

vihangatheturtle/simple-curl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simple-curl

A simple fetch-like CURL wrapper for NodeJS.

Usage

const curl = require('simple-curl')

curl('https://google.com', {
	headers: {
		'test': 'working'
	},
}, r => {
	console.log(r.headers)
	console.log(r.body)
});

If a body is provided, it won't be considered unless the method has been set as POST

const curl = require('simple-curl')

curl('https://google.com', {
	method: 'POST',
	headers: {
		'test': 'working'
	},
	body: 'test'
}, r => {
	console.log(r.headers)
	console.log(r.body)
});

About

GitHub repo for nodejs simple-curl library

Resources

License

Stars

Watchers

Forks

Packages

No packages published