danmactough / node-feedparser

Robust RSS, Atom, and RDF feed parsing in Node.js
Other
1.97k stars 192 forks source link

Is it possible to add para-eTag to fetch()? #283

Closed biotech7 closed 4 years ago

biotech7 commented 4 years ago

Hi, nice work! when frequently accessing the RSS server (or listening on server), we care about whether new feed produced and ready to fetch it. so is it possible to add(set) a 'eTag' para in fetch() to supervise the new feed produced, if not ,return 304 with no further effort to send request for server response. Regards!

danmactough commented 4 years ago

Thanks, @biotech7. It is possible to perform conditional GET requests as you describe. That's all outside the scope of feedparser, though. Just keep in mind that when your conditional GET returns a 304, there's no feed to pass to feedparser -- so don't try to process the empty response body.