1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use serde_json::Value;

use super::HttpMethods;

pub trait Service {
    type Output;
    fn new_request(
        &self,
        method: Option<HttpMethods>,
        url: &str,
        user_auth: Option<(&str, &str)>,
        body: Option<Value>,
    ) -> Result<Self::Output, String>;
    fn invoke_request(&self, request: Self::Output) -> Result<Value, String>;
}