Closed falzm closed 5 years ago
Python's configparser supports multiline, e.g. the tox.ini of this very project.
from configparser import ConfigParser
config = """\
[test]
headers =
foo: bar
spam: eggs
"""
c = ConfigParser()
c.read_string(config)
hs = [line.strip().split(": ")
for line in c.get("test", "headers").split("\n")
if line.strip()]
print(hs)
This change adds support for user-defined arbitrary headers to be injected to every outgoing HTTP request to the Exoscale API. Configuration is done through a new
header_<NAME>
key in thecloudstack.ini
file:Story: The cs library should allow adding arbitrary headers