New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

buco

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buco

Simple fetch library for nodejs

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

Simple fetch library for nodejs

⚙️ Installation

npm i buco

📘 Usage

• Import buco

// ES6
import buco from 'buco';

// commonjs
const buco = require('buco');

• GET request

async function test() {
    const data = await buco.get("https://zenquotes.io/api/random");
    console.log(JSON.parse(data));
}

test();
buco.get("https://zenquotes.io/api/random").then(data => {
    console.log(JSON.parse(data));
});

• GET request and convert to json

async function test() {
    const data = await buco.get("https://zenquotes.io/api/random").json();
    console.log(data);
}

test();
async function test() {
    const data = await buco.get("https://zenquotes.io/api/random", {
        json: true
    });
    console.log(data);
}

test();

• POST request

async function test() {
    const data = await buco.post(`https://is.gd/create.php?format=json&url=https://github.com/Axorax/buco.js`).json();
    console.log(data);
}

test()

Support me on Patreon - Check out my socials

Keywords

buco

FAQs

Package last updated on 08 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts