Skip to content

Commit 7ac040b

Browse files
authored
chore: added put method support (#245)
1 parent e50e188 commit 7ac040b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

client/request_handler.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ func (c *RequestHandler) Post(path string, bodyData url.Values, headers map[stri
8686
return c.sendRequest(http.MethodPost, path, bodyData, headers, body...)
8787
}
8888

89+
func (c *RequestHandler) Put(path string, bodyData url.Values, headers map[string]interface{}, body ...byte) (*http.Response, error) {
90+
return c.sendRequest(http.MethodPut, path, bodyData, headers, body...)
91+
}
92+
8993
func (c *RequestHandler) Get(path string, queryData url.Values, headers map[string]interface{}) (*http.Response, error) {
9094
return c.sendRequest(http.MethodGet, path, queryData, headers)
9195
}

0 commit comments

Comments
 (0)