diff options
Diffstat (limited to 'vendor/github.com/monaco-io/request/resp.go')
-rw-r--r-- | vendor/github.com/monaco-io/request/resp.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/vendor/github.com/monaco-io/request/resp.go b/vendor/github.com/monaco-io/request/resp.go new file mode 100644 index 00000000..fb47dd1c --- /dev/null +++ b/vendor/github.com/monaco-io/request/resp.go @@ -0,0 +1,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() + } +} |