Function get
Source pub async fn get(url: impl Into<String>) -> Result<Response>
Expand description
Convenience function for making a GET request
20async fn get_github_branch(repo: String) -> Result<GitHubBranch> {
21 let url = format!("https://api.github.com/repos/{}/branches/master", repo);
22
23 let response = get(&url).await?.error_for_status()?;
24
25 response.json().await
26}