Skip to content

Commit eeac125

Browse files
authored
add comment for bodyType param in client.Post
1 parent 390c1d8 commit eeac125

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

client.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,11 +870,13 @@ func (c *Client) Head(url string) (*http.Response, error) {
870870
}
871871

872872
// Post is a shortcut for doing a POST request without making a new client.
873+
// The bodyType parameter sets the "Content-Type" header of the request.
873874
func Post(url, bodyType string, body interface{}) (*http.Response, error) {
874875
return defaultClient.Post(url, bodyType, body)
875876
}
876877

877878
// Post is a convenience method for doing simple POST requests.
879+
// The bodyType parameter sets the "Content-Type" header of the request.
878880
func (c *Client) Post(url, bodyType string, body interface{}) (*http.Response, error) {
879881
req, err := NewRequest("POST", url, body)
880882
if err != nil {

0 commit comments

Comments
 (0)