pub fn send<Req: Into<Api>, Resp: DeserializeOwned>(
        &self,
        api: Req,
    ) -> Result<Response<Resp>> {
        let mut api = api.into();
        log::trace!("Sending request {}", api);

        let user_agent = self.user_agent.to_owned();
        api.inner.headers.append(USER_AGENT, user_agent);

        let resp = if api.is_public() {
            self.get(api)?
        } else {
            self.post(api)?
        };

        let status = resp.status();
        let mut resp: Response<Resp> = resp.json()?;
        resp.status_code = status.as_u16();

        Ok(resp)
    }
/// Sends the request to the Kraken servers.
Sends the request to the Kraken servers.
Sends the request to the Kraken servers .
pub fn send<Req: Into<Api>, Resp: DeserializeOwned>(
        &self,
        api: Req,
    ) -> Result<Response<Resp>> {
        let mut api = api.into();
        log::trace!("Sending request {}", api);
        let user_agent = self.user_agent.to_owned();
        api.inner.headers.append(USER_AGENT, user_agent);
        let resp = if api.is_public() {
            self.get(api)?
        } else {
            self.post(api)?
        };
        let status = resp.status();
        let mut resp: Response<Resp> = resp.json()?;
        resp.status_code = status.as_u16();
        Ok(resp)
    }
pub fn send < Req : Into < Api > , Resp : DeserializeOwned > ( & self , api : Req , ) -> Result < Response < Resp > > { let mut api = api . into ( ) ; log :: trace ! ( " " api ) ; let user_agent = self . user_agent . to_owned ( ) ; api . inner . headers . append ( USER_AGENT , user_agent ) ; let resp = if api . is_public ( ) { self . get ( api ) ? } else { self . post ( api ) ? } ; let status = resp . status ( ) ; let mut resp : Response < Resp > = resp . json ( ) ? ; resp . status_code = status . as_u16 ( ) ; Ok ( resp ) }
Sends the request to the Kraken servers.
Sends the request to the Kraken servers .
&self
api
Req
&self
api
Req