pub async fn fetch_data(&self, path: String) -> hyper::Result<Response<Body>> {
        log::info!("Fetching data from uri: {}", &path);
        let uri = self.to_uri(path);

        let request = hyper::Request::builder()
            .uri(uri)
            .header(hyper::header::AUTHORIZATION, self.get_bearer())
            .method(Method::GET)
            .body(Body::empty())
            .unwrap();

        self.inner.request(request).await
    }
/// Async method for getting data from the server
/// Uses GET method and support auth using Bearer and Auth token
Async method for getting data from the server
Uses GET method and support auth using Bearer and Auth token
Async method for getting data from the server Uses GET method and support auth using Bearer and Auth token
pub async fn fetch_data(&self, path: String) -> hyper::Result<Response<Body>> {
        log::info!("Fetching data from uri: {}", &path);
        let uri = self.to_uri(path);
        let request = hyper::Request::builder()
            .uri(uri)
            .header(hyper::header::AUTHORIZATION, self.get_bearer())
            .method(Method::GET)
            .body(Body::empty())
            .unwrap();
        self.inner.request(request).await
    }
pub async fn fetch_data ( & self , path : String ) -> hyper :: Result < Response < Body > > { log :: info ! ( " " path ) ; let uri = self . to_uri ( path ) ; let request = hyper :: Request :: builder ( ) . uri ( uri ) . header ( hyper :: header :: AUTHORIZATION , self . get_bearer ( ) ) . method ( Method :: GET ) . body ( Body :: empty ( ) ) . unwrap ( ) ; self . inner . request ( request ) . await }
Async method for getting data from the server
Uses GET method and support auth using Bearer and Auth token
Async method for getting data from the server Uses GET method and support auth using Bearer and Auth token
&self
path
String
&self
path
String