summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/monaco-io/request/resp.go
diff options
context:
space:
mode:
authorGary Kim <gary@garykim.dev>2020-07-18 22:08:25 +0800
committerGitHub <noreply@github.com>2020-07-18 16:08:25 +0200
commit71a5b72aff5159f3066ff100e1510d935ebdff85 (patch)
treef940bc6e7aa86e1ca818929fb4c2917983a32177 /vendor/github.com/monaco-io/request/resp.go
parent213bf349c319811c8cb5458ac24ad9e61c5bbe4d (diff)
downloadmatterbridge-msglm-71a5b72aff5159f3066ff100e1510d935ebdff85.tar.gz
matterbridge-msglm-71a5b72aff5159f3066ff100e1510d935ebdff85.tar.bz2
matterbridge-msglm-71a5b72aff5159f3066ff100e1510d935ebdff85.zip
Add Nextcloud Talk support (#1167)
Signed-off-by: Gary Kim <gary@garykim.dev>
Diffstat (limited to 'vendor/github.com/monaco-io/request/resp.go')
-rw-r--r--vendor/github.com/monaco-io/request/resp.go18
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()
+ }
+}