Brasilapi.Config (BrasilAPI v0.1.5)

View Source

Configuration module for BrasilAPI client.

Summary

Functions

Returns the base URL for BrasilAPI.

Returns additional Req options for HTTP requests.

Returns the number of retry attempts for failed requests.

Returns the request timeout in milliseconds.

Functions

base_url()

@spec base_url() :: String.t()

Returns the base URL for BrasilAPI.

Can be overridden via application environment or system environment.

req_options()

@spec req_options() :: keyword()

Returns additional Req options for HTTP requests.

Automatically disables retries in test environment for faster tests.

retry_attempts()

@spec retry_attempts() :: non_neg_integer()

Returns the number of retry attempts for failed requests.

timeout()

@spec timeout() :: pos_integer()

Returns the request timeout in milliseconds.