@automaid/url-executor

1.0.0 • Public • Published

url-executor

Allows fetching of one or multiple urls

API

const execute = require('@automaid/url-executor');

await execute('http://google.com'); // GET single url
await execute(['http://google.com', 'http://youtube.com']) // GET multiple urls
await execute({
    url: 'http://google.com',
    options: {
        method: 'POST',
        body: {
            hello: 'world'
        },
        timeout: 0, // 0 = unlimited
        redirect: 'follow', // manual, error, follow
        follow: 20, // 0 don't follow
    }
}); // POST single url with custom options
await execute([{
    url: 'http://google.com',
    options: {
        method: 'POST'
    }
}, 'http://youtube.com']); // GET one and POST one url

Readme

Keywords

none

Package Sidebar

Install

npm i @automaid/url-executor

Weekly Downloads

2

Version

1.0.0

License

GPL-3.0

Last publish

Collaborators

  • maxjoehnk