func (d *dumpClient) writeHeaders(buffer *bytes.Buffer, headers http.Header) {
	filterHeaders(
		d.dumpFormat(),
		d.hiddenHeaders(),
		headers,
		func(name string, value []string) {
			buffer.WriteString(name)
			buffer.WriteString(": ")
			buffer.WriteString(strings.Join(value, ", "))
			buffer.WriteString("\n")
		})
}
func (d *dumpClient) writeHeaders(buffer *bytes.Buffer, headers http.Header) {
	filterHeaders(
		d.dumpFormat(),
		d.hiddenHeaders(),
		headers,
		func(name string, value []string) {
			buffer.WriteString(name)
			buffer.WriteString(": ")
			buffer.WriteString(strings.Join(value, ", "))
			buffer.WriteString("\n")
		})
}
// writeHeaders is a helper function that writes the given HTTP headers to the given buffer as
// human readable strings. If DumpFormat is not Verbose then writeHeaders filters out headers whose
// names are keys of HiddenHeaders.