h_fetch v1.0.2
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!