Currently, HttpConnectorOptions.java allows for a static Map<String, String> of headers. While this works for fixed metadata, it is insufficient for headers that change over time or expire, such as bearer tokens or short-lived security signatures.
I would like to propose adding an option to provide a dynamic callback (e.g., a Supplier or a Functional Interface) that is evaluated just before each request is dispatched.
Maybe, in addition to the static map, we could have a method like the following:
public void addHeaderProvider(String headerName, Supplier<String> valueSupplier)
to add dynamic headers when building the request?