I would like to add a function to the on_connect parameter of input.harbor. The function gets the headers as a list of strings.
Now, I want to iterate over the list to log each header line (for debugging purposes).
How can I achieve this? I have already found list.iter, but not sure how to apply it.
An example would help a lot.
After some try and error and further research I found the solution.
list.iteris indeed the way to go. Iterating over a list of strings ([string, string, ...]) would look like this:If you have a list of string pairs (
[(string, string), (string, string), ...]) you have to do it slightly different: