瀏覽代碼

Use the HEAD method to get the metadata of the object

hangzws 7 年之前
父節點
當前提交
85a08e0d84
共有 1 個文件被更改,包括 1 次插入1 次删除
  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
 	}