@@ -12,16 +12,8 @@ import (
12
12
"io"
13
13
)
14
14
15
- // DefaultClient is the default http Client used by this package.
16
- // It's defaults are expected to represent the best practice
17
- // at the time, but may change over time. If you need more
18
- // control or reproducibility, you should construct your own client.
19
15
var DefaultClient = NewClient ()
20
16
21
- // Get issues a GET request using the DefaultClient and writes the result to
22
- // to w if successful. If the status code of the response is not a success (see
23
- // Success.IsSuccess()) no data will be written and the status code will be
24
- // returned as an error.
25
17
func GET (w io.Writer , url string ) (int64 , error ) {
26
18
resp , err := DefaultClient .GET (url , nil )
27
19
if checkError (err ) {
@@ -32,8 +24,6 @@ func GET(w io.Writer, url string) (int64, error) {
32
24
return io .Copy (w , resp .Body )
33
25
}
34
26
35
- // Post issues a POST request using the DefaultClient using r as the body.
36
- // If the status code was not a success code, it will be returned as an error.
37
27
func POST (url string , r io.Reader ) error {
38
28
resp , err := DefaultClient .POST (url , nil , r )
39
29
if checkError (err ) {
0 commit comments