pub async fn fetch_srcinfo_async(
client: &Client,
name: &str,
) -> Result<String, String>Expand description
What: Fetch .SRCINFO content for an AUR package using async HTTP.
Inputs:
client: Reqwest HTTP client.name: AUR package name.
Output:
- Returns .SRCINFO content as a string, or an error if fetch fails.
ยงErrors
- Returns
Errwhen HTTP request fails (network error or client error) - Returns
Errwhen HTTP response status is not successful - Returns
Errwhen response body cannot be read - Returns
Errwhen response is empty or contains HTML error page
Details:
- Uses reqwest for async fetching with built-in timeout handling.
- Validates that the response is not empty and not HTML.