comparison pkg/imports/wa.go @ 2719:2b6f73c30016

WFS downloader: Add BasicAuth support for downloading. TODO: Use it.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 19 Mar 2019 12:20:54 +0100
parents 542d3441c2d8
children 56c8ef515d93
comparison
equal deleted inserted replaced
2718:eae8ec732101 2719:2b6f73c30016
174 missingProperties int 174 missingProperties int
175 badProperties int 175 badProperties int
176 features int 176 features int
177 ) 177 )
178 178
179 if err := wfs.DownloadURLs(urls, func(url string, r io.Reader) error { 179 // TODO: Fetch from parameters.
180 user, password := "", ""
181
182 if err := wfs.DownloadURLs(user, password, urls, func(url string, r io.Reader) error {
180 feedback.Info("Get features from: '%s'", url) 183 feedback.Info("Get features from: '%s'", url)
181 rfc, err := wfs.ParseRawFeatureCollection(r) 184 rfc, err := wfs.ParseRawFeatureCollection(r)
182 if err != nil { 185 if err != nil {
183 return fmt.Errorf("parsing GetFeature document failed: %v", err) 186 return fmt.Errorf("parsing GetFeature document failed: %v", err)
184 } 187 }