You've already forked sap-jenkins-library
mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-07-15 01:34:38 +02:00
fix(golangBuild): use PUT instead of POST (#3504)
Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com>
This commit is contained in:
@ -39,10 +39,6 @@ func (utils golangBuildMockUtils) SetOptions(options piperhttp.ClientOptions) {
|
||||
}
|
||||
|
||||
func (utils golangBuildMockUtils) UploadRequest(method, url, file, fieldName string, header http.Header, cookies []*http.Cookie, uploadType string) (*http.Response, error) {
|
||||
return nil, fmt.Errorf("not implemented")
|
||||
}
|
||||
|
||||
func (utils golangBuildMockUtils) UploadFile(url, file, fieldName string, header http.Header, cookies []*http.Cookie, uploadType string) (*http.Response, error) {
|
||||
utils.fileUploads[file] = url
|
||||
|
||||
response := http.Response{
|
||||
@ -52,6 +48,10 @@ func (utils golangBuildMockUtils) UploadFile(url, file, fieldName string, header
|
||||
return &response, utils.returnFileUploadError
|
||||
}
|
||||
|
||||
func (utils golangBuildMockUtils) UploadFile(url, file, fieldName string, header http.Header, cookies []*http.Cookie, uploadType string) (*http.Response, error) {
|
||||
return utils.UploadRequest(http.MethodPut, url, file, fieldName, header, cookies, uploadType)
|
||||
}
|
||||
|
||||
func (utils golangBuildMockUtils) Upload(data piperhttp.UploadRequestData) (*http.Response, error) {
|
||||
return nil, fmt.Errorf("not implemented")
|
||||
}
|
||||
|
Reference in New Issue
Block a user