Skip to content

Feature Request: Support for Dynamic Header Suppliers in HttpConnectorOptions #1703

@kvmw

Description

@kvmw

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions