View Source CozyAliyunOpenAPI.HTTPClient.Finch (cozy_aliyun_open_api v0.3.0)
Finch-based HTTP client.
config :cozy_aliyun_open_api,
http_client: CozyAliyunOpenAPI.HTTPClient.Finch
In order to use Finch
as the HTTP client, you must start Finch
and provide a :name
.
Often in your supervision tree:
children = [
{Finch, name: CozyAliyunOpenAPI.Finch}
]
Or, in rare cases, dynamically:
Finch.start_link(name: CozyAliyunOpenAPI.Finch)
If a name different from CozyAliyunOpenAPI.Finch
is used, or you want to use an existing
Finch
instance, you can provide the name via the config:
config :cozy_aliyun_open_api,
http_client: CozyAliyunOpenAPI.HTTPClient.Finch
finch_name: MyApp.Finch