pub trait SlackClientHttpConnector {
    fn http_get_uri<'a, RS>(
        &'a self,
        full_uri: Url,
        context: SlackClientApiCallContext<'a>
    ) -> BoxFuture<'a, ClientResult<RS>>
    where
        RS: for<'de> Deserialize<'de> + Send + 'a
; fn http_get_with_client_secret<'a, RS>(
        &'a self,
        full_uri: Url,
        client_id: &'a SlackClientId,
        client_secret: &'a SlackClientSecret
    ) -> BoxFuture<'a, ClientResult<RS>>
    where
        RS: for<'de> Deserialize<'de> + Send + 'a
; fn http_post_uri<'a, RQ, RS>(
        &'a self,
        full_uri: Url,
        request_body: &'a RQ,
        context: SlackClientApiCallContext<'a>
    ) -> BoxFuture<'a, ClientResult<RS>>
    where
        RQ: Serialize + Send + Sync,
        RS: for<'de> Deserialize<'de> + Send + 'a
; fn http_get<'a, 'p, RS, PT, TS>(
        &'a self,
        method_relative_uri: &str,
        params: &'p PT,
        context: SlackClientApiCallContext<'a>
    ) -> BoxFuture<'a, ClientResult<RS>>
    where
        RS: for<'de> Deserialize<'de> + Send + 'a,
        PT: IntoIterator<Item = (&'p str, Option<&'p TS>)> + Clone,
        TS: ToString + 'p + 'a + Send
, { ... } fn http_post<'a, RQ, RS>(
        &'a self,
        method_relative_uri: &str,
        request: &'a RQ,
        context: SlackClientApiCallContext<'a>
    ) -> BoxFuture<'a, ClientResult<RS>>
    where
        RQ: Serialize + Send + Sync,
        RS: for<'de> Deserialize<'de> + Send + 'a
, { ... } }

Required Methods§

source

fn http_post_uri<'a, RQ, RS>(
    &'a self,
    full_uri: Url,
    request_body: &'a RQ,
    context: SlackClientApiCallContext<'a>
) -> BoxFuture<'a, ClientResult<RS>>where
    RQ: Serialize + Send + Sync,
    RS: for<'de> Deserialize<'de> + Send + 'a,

Provided Methods§

Examples found in repository?
src/client.rs (line 273)
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
    pub async fn http_get<'p, RS, PT, TS>(
        &self,
        method_relative_uri: &str,
        params: &'p PT,
        rate_control_params: Option<&'a SlackApiMethodRateControlConfig>,
    ) -> ClientResult<RS>
    where
        RS: for<'de> serde::de::Deserialize<'de> + Send,
        PT: std::iter::IntoIterator<Item = (&'p str, Option<&'p TS>)> + Clone,
        TS: std::string::ToString + 'p + Send,
    {
        let context = SlackClientApiCallContext {
            rate_control_params,
            token: Some(self.token),
            tracing_span: &self.span,
            is_sensitive_url: false,
        };

        self.client
            .http_api
            .connector
            .http_get(method_relative_uri, params, context)
            .await
    }
source

fn http_post<'a, RQ, RS>(
    &'a self,
    method_relative_uri: &str,
    request: &'a RQ,
    context: SlackClientApiCallContext<'a>
) -> BoxFuture<'a, ClientResult<RS>>where
    RQ: Serialize + Send + Sync,
    RS: for<'de> Deserialize<'de> + Send + 'a,

Examples found in repository?
src/client.rs (line 297)
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
    pub async fn http_post<RQ, RS>(
        &self,
        method_relative_uri: &str,
        request: &RQ,
        rate_control_params: Option<&'a SlackApiMethodRateControlConfig>,
    ) -> ClientResult<RS>
    where
        RQ: serde::ser::Serialize + Send + Sync,
        RS: for<'de> serde::de::Deserialize<'de> + Send,
    {
        let context = SlackClientApiCallContext {
            rate_control_params,
            token: Some(self.token),
            tracing_span: &self.span,
            is_sensitive_url: false,
        };

        self.client
            .http_api
            .connector
            .http_post(method_relative_uri, &request, context)
            .await
    }

Implementors§