Explorar o código

Use the HEAD method to get the metadata of the object

hangzws %!s(int64=7) %!d(string=hai) anos
pai
achega
85a08e0d84
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      oss/bucket.go

+ 1 - 1
oss/bucket.go

@@ -557,7 +557,7 @@ func (bucket Bucket) GetObjectMeta(objectKey string, options ...Option) (http.He
 	params := map[string]interface{}{}
 	params["objectMeta"] = nil
 	//resp, err := bucket.do("GET", objectKey, "?objectMeta", "", nil, nil, nil)
-	resp, err := bucket.do("GET", objectKey, params, options, nil, nil)
+	resp, err := bucket.do("HEAD", objectKey, params, options, nil, nil)
 	if err != nil {
 		return nil, err
 	}