MessageHeaders.foreach_

Calls func once for each header value in hdrs.

Beware that unlike soup.message_headers.MessageHeaders.getList, this processes the headers in exactly the way they were added, rather than concatenating multiple same-named headers into a single value. (This is intentional; it ensures that if you call soup.message_headers.MessageHeaders.append multiple times with the same name, then the I/O code will output multiple copies of the header when sending the message to the remote implementation, which may be required for interoperability in some cases.)

You may not modify the headers from func.

class MessageHeaders
void
foreach_

Parameters

func soup.types.MessageHeadersForeachFunc

callback function to run for each header