all: Remove or convert deprecated API usages (#8459)

This commit is contained in:
Jakob Borg
2022-07-28 17:14:49 +02:00
committed by GitHub
parent 7e26f74f38
commit 7bdb5faa9c
7 changed files with 10 additions and 11 deletions
+1 -2
View File
@@ -444,11 +444,10 @@ func soapRequest(ctx context.Context, url, service, function, message string) ([
body := fmt.Sprintf(tpl, message)
req, err := http.NewRequest("POST", url, strings.NewReader(body))
req, err := http.NewRequestWithContext(ctx, "POST", url, strings.NewReader(body))
if err != nil {
return resp, err
}
req.Cancel = ctx.Done()
req.Close = true
req.Header.Set("Content-Type", `text/xml; charset="utf-8"`)
req.Header.Set("User-Agent", "syncthing/1.0")