| Crates.io | bt_http_cli_conf |
| lib.rs | bt_http_cli_conf |
| version | 0.1.3 |
| created_at | 2025-03-19 19:08:03.780892+00 |
| updated_at | 2026-01-12 16:06:03.989701+00 |
| description | Retrieve the HTTP client configuration for a given environment from a YAML file. |
| homepage | https://github.com/bachuetech/bt_http_cli_conf |
| repository | https://github.com/bachuetech/bt_http_cli_conf |
| max_upload_size | |
| id | 1598503 |
| size | 19,827 |
BT HTTP CLI CONFIG
The get_http_client_config function is used to retrieve the HTTP client configuration for a given environment. It loads the configuration from a YAML file specified by an environment variable or specific path if the environment variable is nout found and returns the configuration as a vector of tuples containing key-value pairs.
const API_MGR_CONFIG_YML: &str = "config/http/client-config.yml";
const API_MGR_CONFIG_YML_ENV_VAR_NAME: &str = "BT_HTTPCLI_YMLCONFIGFILE";
let environment = "dev";
let conf = get_http_client_bool_config(&environment.to_owned()
, &API_MGR_CONFIG_YML_ENV_VAR_NAME.to_string()
, &API_MGR_CONFIG_YML.to_string());
GPL-3.0-only