ruxios 0.1.2

Ruxios is an HTTP library for Rust, inspired by Axios, with a simple yet robust interface
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub fn string_to_method<T>(method: T) -> reqwest::Method
where
  T: AsRef<str>,
{
  match method.as_ref().to_uppercase().as_str() {
    "GET" => reqwest::Method::GET,
    "POST" => reqwest::Method::POST,
    "PUT" => reqwest::Method::PUT,
    "DELETE" => reqwest::Method::DELETE,
    "HEAD" => reqwest::Method::HEAD,
    "OPTIONS" => reqwest::Method::OPTIONS,
    "CONNECT" => reqwest::Method::CONNECT,
    "PATCH" => reqwest::Method::PATCH,
    "TRACE" => reqwest::Method::TRACE,
    _ => reqwest::Method::GET,
  }
}