Skip to content

@alex.garcia/libfec / rss / FetchOptions

Interface: FetchOptions ​

Defined in: rss.ts:87

fetch's options: the feed filters, plus how to fetch.

Extends ​

Properties ​

preset? ​

optional preset?: Preset

Defined in: rss.ts:75

A predefined filter (case-insensitive). Default "all".

Inherited from ​

FeedOptions.preset


committees? ​

optional committees?: string | Iterable<string, any, any>

Defined in: rss.ts:77

Committee IDs ("C00505412").

Inherited from ​

FeedOptions.committees


forms? ​

optional forms?: string | Iterable<string, any, any>

Defined in: rss.ts:79

Form types ("F3X").

Inherited from ​

FeedOptions.forms


states? ​

optional states?: string | Iterable<string, any, any>

Defined in: rss.ts:81

Two-letter state codes.

Inherited from ​

FeedOptions.states


parties? ​

optional parties?: string | Iterable<string, any, any>

Defined in: rss.ts:83

Party codes ("DEM").

Inherited from ​

FeedOptions.parties


signal? ​

optional signal?: AbortSignal

Defined in: rss.ts:89

Abort the request. Default: a 60-second timeout.


proxy? ​

optional proxy?: ProxyOption

Defined in: rss.ts:101

Fetch the feed through a proxy. The FEC sends no CORS headers, so a browser page can't read the feed directly. Not needed in Node, Deno or Bun.

  • a string containing {url}: that placeholder is replaced by the URL-encoded feed URL ("https://proxy.example/fetch?u={url}");
  • any other string: a prefix for the URL-encoded feed URL ("https://proxy.example/?url=");
  • a function: given the feed URL, returns the URL to fetch.