merge conflicts

This commit is contained in:
Chris Lu
2015-02-07 15:35:28 -08:00
parent 714ccb6e2b
commit f7998f8652
21 changed files with 271 additions and 137 deletions

View File

@@ -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
}