@@ -571,8 +571,8 @@ func defaultCheckRedirect(req *Request, via []*Request) error {
571
571
// Post is a wrapper around DefaultClient.Post.
572
572
//
573
573
// To set custom headers, use NewRequest and DefaultClient.Do.
574
- func Post (url string , bodyType string , body io.Reader ) (resp * Response , err error ) {
575
- return DefaultClient .Post (url , bodyType , body )
574
+ func Post (url string , contentType string , body io.Reader ) (resp * Response , err error ) {
575
+ return DefaultClient .Post (url , contentType , body )
576
576
}
577
577
578
578
// Post issues a POST to the specified URL.
@@ -583,12 +583,12 @@ func Post(url string, bodyType string, body io.Reader) (resp *Response, err erro
583
583
// request.
584
584
//
585
585
// To set custom headers, use NewRequest and Client.Do.
586
- func (c * Client ) Post (url string , bodyType string , body io.Reader ) (resp * Response , err error ) {
586
+ func (c * Client ) Post (url string , contentType string , body io.Reader ) (resp * Response , err error ) {
587
587
req , err := NewRequest ("POST" , url , body )
588
588
if err != nil {
589
589
return nil , err
590
590
}
591
- req .Header .Set ("Content-Type" , bodyType )
591
+ req .Header .Set ("Content-Type" , contentType )
592
592
return c .doFollowingRedirects (req , shouldRedirectPost )
593
593
}
594
594
0 commit comments