config icon indicating copy to clipboard operation
config copied to clipboard

Capability of passing request properties for config.url

Open Anatoliy4041 opened this issue 3 years ago • 0 comments

Sometimes configs resides under urls, where some kind of URLConnection request properties configuring capability is required. For example, if we set -Dconfig.url="https://url_here_my_config_is_residing/my_config.conf" and the server requires some kind of authentication, e.g. via Bearer token, it would return Not Found. To tackle it down, we have to set:

connection.setRequestProperty("Authorization", "Bearer ${my_token}")

However, currently, a library consumer is only able to configure accept request property (link).

@havocp and @akka-team wouldn't it be more beneficial to add a capability of passing some kind of Map request properties defined by a library consumer, to be more flexible around configuring underlying URLConnection ? At least to configure Authorization (e.g. -Dconfig.authorization=...)

Anatoliy4041 avatar Apr 26 '22 12:04 Anatoliy4041