INNER CODE UNIT · Rust

api_url

orhun/git-cliff · git-cliff-core/src/remote/mod.rs:157

    fn api_url(&self) -> String {
        env::var(Self::API_URL_ENV)
            .ok()
            .or(self.remote().api_url)
            .unwrap_or_else(|| Self::API_URL.to_string())
    }

    /// Returns the remote repository information.
    fn remote(&self) -> Remote;

    /// Returns the HTTP client for making requests.
    fn client(&self) -> ClientWithMiddleware;

    /// Performs a HTTP GET request, deserializes the JSON response, and returns the result.
    /// This is the core HTTP request and JSON parsing logic shared by all API methods.
    /// Callers are responsible for any additional processing of the deserialized data.
    async fn get_json<T: DeserializeOwned>(&self, url: &str) -> Result<T> {
        tracing::debug!("Sending request to: {url}");

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…