url-metadata
url-metadata copied to clipboard
add customHeaders option
I suggest adding a new option customHeaders
to specify any header if needed.
In my use case, a website may prompt a window at the first time to confirm my age is over 18. So in this case I can add a custom cookie in the header:
urlMetadata('https://www.ptt.cc/bbs/Gossiping/index.html', {
customHeaders: {
'cookie': 'over18=1'
}
}).then( ... );
When will this be merged?
Custom header option available in new version 3.0.1
https://www.npmjs.com/package/url-metadata