Aliyun.Oss.Object.head_object

You're seeing just the function head_object, go back to Aliyun.Oss.Object module for more information.
Link to this function

head_object(bucket, object, headers \\ %{}, sub_resources \\ %{})

Specs

head_object(String.t(), String.t(), map(), map()) ::
  {:error, error()} | {:ok, Aliyun.Oss.Client.Response.t()}

HeadObject只返回某个Object的meta信息,不返回文件内容。

Examples

iex> Aliyun.Oss.Object.head_object("some-bucket", "some-object")
{:ok,
%Aliyun.Oss.Client.Response{
  data: "",
  headers: [
    {"Server", "AliyunOSS"},
    {"Date", "Wed, 05 Dec 2018 05:50:02 GMT"},
    {"Content-Type", "application/octet-stream"},
    {"Content-Length", "0"},
    {"Connection", "keep-alive"},
    {"x-oss-request-id", "5C0000000000000000000000"},
    {"Accept-Ranges", "bytes"},
    {"ETag", ""D4100000000000000000000000000000""},
    {"Last-Modified", "Mon, 15 Oct 2018 01:38:47 GMT"},
    {"x-oss-object-type", "Normal"},
    {"x-oss-hash-crc64ecma", "0"},
    {"x-oss-storage-class", "IA"},
    {"Content-MD5", "1B2M2Y8AsgTpgAmY7PhCfg=="},
    {"x-oss-server-time", "19"}
  ]
}}
iex> Aliyun.Oss.Object.head_object("some-bucket", "unknown-object")
{:error, %Aliyun.Oss.Client.Error{status_code: 404, body: "", parsed_details: nil}}