osynic_osuapi 0.1.10

High performance, well-structured, extensible Rust osu! API client. Supports both WASM and native environments.
Documentation
1
2
3
4
5
6
7
8
9
use crate::error::Result;
use reqwest::Response;

pub fn check_res(response: Response) -> Result<Response> {
    match response.status() {
        reqwest::StatusCode::OK => Ok(response),
        _ => Err(response.into()),
    }
}