Skip to content

@alex.garcia/libfec / rss / FetchOptions

Interface: FetchOptions ​

Defined in: rss.ts:86

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

Extends ​

Properties ​

preset? ​

optional preset?: Preset

Defined in: rss.ts:74

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

Inherited from ​

FeedOptions.preset


committees? ​

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

Defined in: rss.ts:76

Committee IDs ("C00505412").

Inherited from ​

FeedOptions.committees


forms? ​

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

Defined in: rss.ts:78

Form types ("F3X").

Inherited from ​

FeedOptions.forms


states? ​

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

Defined in: rss.ts:80

Two-letter state codes.

Inherited from ​

FeedOptions.states


parties? ​

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

Defined in: rss.ts:82

Party codes ("DEM").

Inherited from ​

FeedOptions.parties


signal? ​

optional signal?: AbortSignal

Defined in: rss.ts:88

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


proxy? ​

optional proxy?: string | ((url) => string)

Defined in: rss.ts:100

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.