Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // oauth.rs
- extern crate reqwest;
- fn getHTTPMethodString(method: reqwest::Method) -> String {
- match method {
- reqwest::Method::Options => "OPTIONS".to_string(),
- reqwest::Method::Get => "GET".to_string(),
- reqwest::Method::Post => "POST".to_string(),
- // ...
- }
- // ...
- pub fn generateTwitterRequest(method: reqwest::Method, ...) -> String {
- ...
- }
- // main.rs
- extern crate reqwest;
- mod oauth;
- fn index() -> String {
- oauth::generateTwitterRequest(reqwest::Method::POST, ...) // GENERATES ERROR "variant not found in `reqwest::Method`"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement