comparison pkg/imports/dma.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 02505fcff63c
children 56c8ef515d93
comparison
equal deleted inserted replaced
2718:eae8ec732101 2719:2b6f73c30016
167 missingProperties int 167 missingProperties int
168 badProperties int 168 badProperties int
169 features int 169 features int
170 ) 170 )
171 171
172 if err := wfs.DownloadURLs(urls, func(url string, r io.Reader) error { 172 // TODO: Fetch from parameters.
173 user, password := "", ""
174
175 if err := wfs.DownloadURLs(user, password, urls, func(url string, r io.Reader) error {
173 feedback.Info("Get features from: '%s'", url) 176 feedback.Info("Get features from: '%s'", url)
174 rfc, err := wfs.ParseRawFeatureCollection(r) 177 rfc, err := wfs.ParseRawFeatureCollection(r)
175 if err != nil { 178 if err != nil {
176 return fmt.Errorf("parsing GetFeature document failed: %v", err) 179 return fmt.Errorf("parsing GetFeature document failed: %v", err)
177 } 180 }