View Source AppStore.HTTPClient.DefaultClient (App Store v0.2.0)
The default implementation for AppStore.HTTPClient
. Uses Finch
as the HTTP client.
Add the AppStore.HTTPClient.DefaultClient
to your application's supervision tree:
# lib/your_app/application.ex
def start(_type, _args) do
children = [
...
{AppStore.HTTPClient.DefaultClient, []}
]
...
end
Or start it dynamically with start_link/1
Summary
Functions
Start an instance of the defalut HTTPClient.
Functions
Start an instance of the defalut HTTPClient.
The following options will be passed to the Finch.start_link/1
:
[
name: __MODULE__
pools: %{
AppStore.API.Config.sandbox_server_url() => [size: 1],
AppStore.API.Config.production_server_url() => [size: 10]
}
]
You override the default options with opts
, see Finch.start_link/1
for detail.
Example
opts = [
pools: %{
AppStore.API.Config.production_server_url() => [size: 30]
}
]
AppStore.HTTPClient.DefaultClient.start_link(opts)