Skip to main content

LysHttp

Trait LysHttp 

Source
pub trait LysHttp:
    Send
    + Sync
    + Debug {
    // Required methods
    fn get(
        &self,
        bearer: &str,
        path: &str,
    ) -> Result<LysAnswer, ServiceEffectError>;
    fn post(
        &self,
        bearer: &str,
        path: &str,
        body: &Value,
    ) -> Result<LysAnswer, ServiceEffectError>;
}
Expand description

The Lys routes the services bind to, asked with a bearer pass.

Required Methods§

Source

fn get(&self, bearer: &str, path: &str) -> Result<LysAnswer, ServiceEffectError>

GET {issuer}/{path} with bearer.

§Errors

Lys could not be asked (lys_could_not_be_asked), or its body was not JSON.

Source

fn post( &self, bearer: &str, path: &str, body: &Value, ) -> Result<LysAnswer, ServiceEffectError>

POST {issuer}/{path} with bearer and the JSON body.

§Errors

Lys could not be asked (lys_could_not_be_asked), or its body was not JSON.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§