blob: fb47dd1c6ac4995ff07f5e8f833fb824835bf140 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package request
// StatusCode get response status code
func (s *SugaredResp) StatusCode() (code int) {
return s.resp.StatusCode
}
// Status get response status code and text, like 200 ok
func (s *SugaredResp) Status() (status string) {
return s.resp.Status
}
// Close close response body
func (s *SugaredResp) Close() {
if s.resp != nil {
_ = s.resp.Body.Close()
}
}
|