Skip to main content

mecha10_cli_core/utils/
http_client.rs

1//! Shared HTTP client construction for CLI-side services that talk to mecha10-api or other
2//! HTTP endpoints, so the user agent stays consistent across callers.
3
4use anyhow::{Context, Result};
5
6/// Build a `reqwest::Client` configured with the standard mecha10-cli user agent.
7pub fn build_client() -> Result<reqwest::Client> {
8    reqwest::Client::builder()
9        .user_agent("mecha10-cli")
10        .build()
11        .context("Failed to build HTTP client")
12}