Skip to content

Commit 706bb74

Browse files
committed
fix: Remove outdated usage
1 parent 1dc4b5c commit 706bb74

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

request.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package ghttp
22

33
import (
4-
"github.com/google/uuid"
54
"io"
6-
"io/ioutil"
75
"net/http"
86
"net/url"
97
"strings"
108
"time"
9+
10+
"github.com/google/uuid"
1111
)
1212

1313
const DefaultTimeout = 8 * time.Second
@@ -96,12 +96,12 @@ func (r *Request) Send() (*Response, error) {
9696
}
9797
defer rep.Body.Close()
9898

99-
respBody, err := ioutil.ReadAll(rep.Body)
99+
respBody, err := io.ReadAll(rep.Body)
100100
if err != nil {
101101
return nil, err
102102
}
103103

104-
response := NewResponse(rep, respBody, time.Now().Sub(start))
104+
response := NewResponse(rep, respBody, time.Since(start))
105105

106106
response.RequestId = r.RequestId
107107

0 commit comments

Comments
 (0)