Add some tests for http server
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2022-01-18 20:58:30 +01:00
parent 1caec97d81
commit d8817cc67f
2 changed files with 101 additions and 1 deletions

View File

@@ -78,10 +78,11 @@ func ActionUpload(c *cli.Context) error {
}
mw.Close()
req, err := http.NewRequestWithContext(ctx, http.MethodPost, url, buf)
req.Header.Add("Content-Type", mw.FormDataContentType())
if err != nil {
return err
}
req.Header.Add("Content-Type", mw.FormDataContentType())
resp, err := client.Do(req)
if err != nil {
return err