1.0.2 • Published 4 years ago

h_fetch v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

header-fetch

Welcome to header-fetch, an easy to use custom fetch utility built off of node-fetch

Example usage:

let fetch = require('h_fetch');
fetch("https://api.alexflipnote.dev/dogs",["file"],{
    file:{
        action: "console.log",
        content: "Image: {val}"
    }
})

URL: Type: String Description: The URL you wish to fetch. Headers: Type: String/Array Description: The headers you wish to fetch from the api, scroll down for more info. Opts: Type: Table Description: Specific options for fetching from the URL and Headers Info The url has to be an absoloute url, meaning it stars with http(s):// ... The headers param can take array a string, so I can get multiple headers or just one Opts: Opts are required, you use it by simply making a sub-table with the header name and then you can specify different actions. Current actions are: "console.log". You can also customise your message per header by specifying content: Then passing in a string, to get the info from that header just place through {val} how ever many times you want! I hope this can help you!

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago