httpclient/http.go
func NewPB(pb *ParamBlock) HTTPClient {
	responseHeaderTimeout := pb.ResponseHeaderTimeout
	if responseHeaderTimeout == 0 {
		responseHeaderTimeout = defaultResponseHeaderTimeout
	}
	dumpFormat := pb.DumpFormat
	if dumpFormat == 0 {
		dumpFormat = NoDump
	}
	hiddenHeaders := pb.HiddenHeaders
	if hiddenHeaders == nil {
		hiddenHeaders = defaultHiddenHeaders // immutable
	} else {
		hiddenHeaders = copyHiddenHeaders(hiddenHeaders) // copy to avoid side-effects
	}
	dc := &dumpClient{Client: newRawClient(pb.NoRedirect, pb.NoCertCheck, pb.DisableKeepAlives, responseHeaderTimeout)}
	dc.isInsecure = func() bool {
		return pb.Insecure
	}
	dc.dumpFormat = func() Format {
		return dumpFormat
	}
	dc.hiddenHeaders = func() map[string]bool {
		return hiddenHeaders
	}
	return dc
}
func NewPB(pb *ParamBlock) HTTPClient {
	responseHeaderTimeout := pb.ResponseHeaderTimeout
	if responseHeaderTimeout == 0 {
		responseHeaderTimeout = defaultResponseHeaderTimeout
	}
	dumpFormat := pb.DumpFormat
	if dumpFormat == 0 {
		dumpFormat = NoDump
	}
	hiddenHeaders := pb.HiddenHeaders
	if hiddenHeaders == nil {
		hiddenHeaders = defaultHiddenHeaders // immutable
	} else {
		hiddenHeaders = copyHiddenHeaders(hiddenHeaders) // copy to avoid side-effects
	}
	dc := &dumpClient{Client: newRawClient(pb.NoRedirect, pb.NoCertCheck, pb.DisableKeepAlives, responseHeaderTimeout)}
	dc.isInsecure = func() bool {
		return pb.Insecure
	}
	dc.dumpFormat = func() Format {
		return dumpFormat
	}
	dc.hiddenHeaders = func() map[string]bool {
		return hiddenHeaders
	}
	return dc
}
// NewPB returns an HTTP client using only the parameter block and ignoring
// the current values of the package variables, which are not go-routine safe.