Skip to content

Commit 6493911

Browse files
committed
Merge pull request astaxie#7 from buaazp/support_form_put
Support form params for PUT/PATCH
2 parents 67a5acc + b120328 commit 6493911

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

httplib/httplib.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ func (b *BeegoHttpRequest) buildUrl(paramBody string) {
304304
return
305305
}
306306

307-
// build POST url and body
308-
if b.req.Method == "POST" && b.req.Body == nil {
307+
// build POST/PUT/PATCH url and body
308+
if (b.req.Method == "POST" || b.req.Method == "PUT" || b.req.Method == "PATCH") && b.req.Body == nil {
309309
// with files
310310
if len(b.files) > 0 {
311311
pr, pw := io.Pipe()

0 commit comments

Comments
 (0)