0.0.6 • Published 1 year ago

@lachero/node-curl v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Installation

npm i @lachero/node-curl

Usage

import curl from '@lachero/node-curl';

const response = await curl('https://jsonplaceholder.typicode.com/posts', {
	method: 'POST',
	data: {
		userId: 1,
	},
});

// or using instance
const curlInstance = curl.createInstance({
	baseUrl: 'https://jsonplaceholder.typicode.com',
	headers: {
		'Content-Type': 'application/json',
		Authorization: 'Bearer token',
	},
	proxy: 'localhost:8080',
});

const response = await curlInstance('/posts', {
	method: 'POST',
	data: {
		userId: 1,
	},
});
0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago