Moved common HTTP polling helpers into feedkit and implemented support for ETag and Last-Modified
This commit is contained in:
@@ -11,4 +11,14 @@
|
||||
//
|
||||
// A single source may emit 0..N events per poll or stream iteration, and those
|
||||
// events may span multiple event kinds.
|
||||
//
|
||||
// HTTP-backed polling sources can share NewHTTPSource for generic HTTP config
|
||||
// parsing and conditional GET behavior. The helper understands:
|
||||
// - params.url
|
||||
// - params.user_agent
|
||||
// - params.conditional (optional, default true)
|
||||
//
|
||||
// When validators are available, NewHTTPSource prefers ETag/If-None-Match and
|
||||
// falls back to Last-Modified/If-Modified-Since. A 304 Not Modified response is
|
||||
// treated as a successful unchanged poll.
|
||||
package sources
|
||||
|
||||
Reference in New Issue
Block a user