Skip to content

Commit

Permalink
chore: adjust fileReader
Browse files Browse the repository at this point in the history
  • Loading branch information
ViolaPioggia committed May 29, 2024
1 parent da9bb18 commit ec738a7
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions request.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ type Request struct {
Result interface{}
Error interface{}
isMultiPart bool
multipartFiles []*File
}

const (
Expand Down Expand Up @@ -205,12 +204,7 @@ func (r *Request) SetFiles(files map[string]string) *Request {
}

func (r *Request) SetFileReader(param, fileName string, reader io.Reader) *Request {
r.isMultiPart = true
r.multipartFiles = append(r.multipartFiles, &File{
Name: fileName,
ParamName: param,
Reader: reader,
})
r.RawRequest.SetFileReader(param, fileName, reader)
return r
}
func (r *Request) SetResult(res interface{}) *Request {
Expand Down

0 comments on commit ec738a7

Please sign in to comment.