You're seeing just the function get, go back to Cldr.Http module for more information.


get(String.t()) :: {:ok, binary()} | {:error, any()}

Securely download https content from a URL.

This function uses the built-in :httpc client but enables certificate verification which is not enabled by :httc by default.


  • url is a binary URL


  • {:ok, body} if the return is successful

  • {:error, error} if the download is unsuccessful. An error will also be logged in these cases.

Certificate stores

In order to keep dependencies to a minimum, get/1 attempts to locate an already installed certificate store. It will try to locate a store in the following order which is intended to satisfy most host systems. The certificate store is expected to be a path name on the host system.

# A certificate store configured by the
# developer
Application.get_env(:ex_cldr, :cacertfile)

# Populated if hex package `CAStore` is configured

# Populated if hex package `certfi` is configured

# Debian/Ubuntu/Gentoo etc.

# Fedora/RHEL 6

# OpenSUSE

# OpenELEC

# CentOS/RHEL 7

# Open SSL on MacOS

# MacOS & Alpine Linux