Aliyun.Oss.Bucket.CORS.get

You're seeing just the function get, go back to Aliyun.Oss.Bucket.CORS module for more information.

Specs

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

GetBucketCors接口用于获取指定存储空间(Bucket)当前的跨域资源共享CORS(Cross-Origin Resource Sharing)规则。

Examples

iex> Aliyun.Oss.Bucket.CORS.get("some-bucket")
{:ok, %Aliyun.Oss.Client.Response{
  data: %{
    "CORSConfiguration" => %{
      "CORSRule" => [
        %{
          "AllowedHeader" => "authorization",
          "AllowedMethod" => ["PUT", "GET"],
          "AllowedOrigin" => "*"
        },
        %{
          "AllowedHeader" => "authorization",
          "AllowedMethod" => "GET",
          "AllowedOrigin" => ["http://www.a.com", "http://www.b.com"],
          "ExposeHeader" => ["x-oss-test", "x-oss-test1"],
          "MaxAgeSeconds" => "100"
        }
      ],
      "ResponseVary" => "false"
    }
  },
  headers: [
    {"Date", "Wed, 05 Dec 2018 02:34:57 GMT"},
    ...
  ]
}}