diff options
| author | yourchanges <yourchanges@gmail.com> | 2015-02-12 17:32:53 +0800 |
|---|---|---|
| committer | yourchanges <yourchanges@gmail.com> | 2015-02-12 17:32:53 +0800 |
| commit | 2adf4a108b595ec8b4503b34665591741fa4f963 (patch) | |
| tree | da968af4fa066dfd281ae0ef4e6d59d806fed10e /go/util | |
| parent | 55c40997b1cd9e33eaa841b8abf5e1678773dd1c (diff) | |
| parent | eff83a87d126faf0dd5b05876690271777f41e65 (diff) | |
| download | seaweedfs-2adf4a108b595ec8b4503b34665591741fa4f963.tar.xz seaweedfs-2adf4a108b595ec8b4503b34665591741fa4f963.zip | |
Merge pull request #6 from chrislusf/master
merge
Diffstat (limited to 'go/util')
| -rw-r--r-- | go/util/constants.go | 2 | ||||
| -rw-r--r-- | go/util/http_util.go | 7 |
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 } |
