Low-level HTTP client for the FRED API using Req.
Handles request construction, parameter serialization, response parsing, and telemetry instrumentation.
All endpoint modules delegate to this module for actual HTTP calls.
Telemetry
Every request is wrapped in a [:fred, :request] telemetry span.
See Fred.Telemetry for event names, measurements, and metadata.
Summary
Functions
Makes a GET request to the provided FRED API endpoint.
Makes a GET request to the provided FRED Maps API endpoint. Used internally
by Fred.Maps for the GeoFRED base URL. params should contain the query
parameters required for the endpoint.
Makes a GET request to the provided FRED Maps API endpoint. Used internally
by Fred.Maps to get shape files versus JSON.
Types
@type response() :: {:ok, map()} | {:error, Fred.Error.t()}
Functions
Makes a GET request to the provided FRED API endpoint.
Automatically injects the API key, sets file_type=json, and emits
telemetry events around the request. params should contain the query
parameters required for the endpoint.
Makes a GET request to the provided FRED Maps API endpoint. Used internally
by Fred.Maps for the GeoFRED base URL. params should contain the query
parameters required for the endpoint.
Makes a GET request to the provided FRED Maps API endpoint. Used internally
by Fred.Maps to get shape files versus JSON.