refactor all methods strings to const (#5726)

This commit is contained in:
Konstantin Lebedev
2024-07-01 13:00:39 +05:00
committed by GitHub
parent 0fdf7eca48
commit 5ffacbb6ea
18 changed files with 84 additions and 84 deletions

View File

@@ -115,7 +115,7 @@ func uploadFileToFiler(client *http.Client, data []byte, filename, destination s
uri := destination + filename
request, err := http.NewRequest("POST", uri, body)
request, err := http.NewRequest(http.MethodPost, uri, body)
request.Header.Set("Content-Type", writer.FormDataContentType())
// request.Close = true // can not use this, which do not reuse http connection, impacting filer->volume also.

View File

@@ -130,7 +130,7 @@ func uploadFileToFiler(client *http.Client, filename, destination string) (size
uri := destination + file.Name()
request, err := http.NewRequest("POST", uri, body)
request, err := http.NewRequest(http.MethodPost, uri, body)
request.Header.Set("Content-Type", writer.FormDataContentType())
resp, err := client.Do(request)