mecha10-cli-core 0.8.0

Mecha10 CLI core foundation — shared types, services, and utilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
//! Shared HTTP client construction for CLI-side services that talk to mecha10-api or other
//! HTTP endpoints, so the user agent stays consistent across callers.

use anyhow::{Context, Result};

/// Build a `reqwest::Client` configured with the standard mecha10-cli user agent.
pub fn build_client() -> Result<reqwest::Client> {
    reqwest::Client::builder()
        .user_agent("mecha10-cli")
        .build()
        .context("Failed to build HTTP client")
}