aboutsummaryrefslogtreecommitdiff
path: root/go/util
diff options
context:
space:
mode:
Diffstat (limited to 'go/util')
-rw-r--r--go/util/constants.go2
-rw-r--r--go/util/http_util.go7
2 files changed, 7 insertions, 2 deletions
diff --git a/go/util/constants.go b/go/util/constants.go
index 1aa59d634..ca801574c 100644
--- a/go/util/constants.go
+++ b/go/util/constants.go
@@ -1,5 +1,5 @@
package util
const (
- VERSION = "0.68"
+ VERSION = "0.69 beta"
)
diff --git a/go/util/http_util.go b/go/util/http_util.go
index 08de56ba9..72cab76e1 100644
--- a/go/util/http_util.go
+++ b/go/util/http_util.go
@@ -7,6 +7,8 @@ import (
"net/http"
"net/url"
"strings"
+
+ "github.com/chrislusf/weed-fs/go/security"
)
var (
@@ -63,8 +65,11 @@ func Get(url string) ([]byte, error) {
return b, nil
}
-func Delete(url string) error {
+func Delete(url string, jwt security.EncodedJwt) error {
req, err := http.NewRequest("DELETE", url, nil)
+ if jwt != "" {
+ req.Header.Set("Authorization", "BEARER "+string(jwt))
+ }
if err != nil {
return err
}