pub async fn request_async<C, F, RE, EF>(
        self,
        http_client: C,
    ) -> Result<DeviceAuthorizationResponse<EF>, RequestTokenError<RE, TE>>
    where
        C: FnOnce(HttpRequest) -> F,
        F: Future<Output = Result<HttpResponse, RE>>,
        RE: Error + 'static,
        EF: ExtraDeviceAuthorizationFields,
    {
        let http_request = self.prepare_request()?;
        let http_response = http_client(http_request)
            .await
            .map_err(RequestTokenError::Request)?;
        endpoint_response(http_response)
    }
///
/// Asynchronously sends the request to the authorization server and returns a Future.
///
Asynchronously sends the request to the authorization server and returns a Future.
Asynchronously sends the request to the authorization server and returns a Future .
pub async fn request_async<C, F, RE, EF>(
        self,
        http_client: C,
    ) -> Result<DeviceAuthorizationResponse<EF>, RequestTokenError<RE, TE>>
    where
        C: FnOnce(HttpRequest) -> F,
        F: Future<Output = Result<HttpResponse, RE>>,
        RE: Error + 'static,
        EF: ExtraDeviceAuthorizationFields,
    {
        let http_request = self.prepare_request()?;
        let http_response = http_client(http_request)
            .await
            .map_err(RequestTokenError::Request)?;
        endpoint_response(http_response)
    }
pub async fn request_async < C , F , RE , EF > ( self , http_client : C , ) -> Result < DeviceAuthorizationResponse < EF > , RequestTokenError < RE , TE > > where C : FnOnce ( HttpRequest ) -> F , F : Future < Output = Result < HttpResponse , RE > > , RE : Error + ' static , EF : ExtraDeviceAuthorizationFields , { let http_request = self . prepare_request ( ) ? ; let http_response = http_client ( http_request ) . await . map_err ( RequestTokenError :: Request ) ? ; endpoint_response ( http_response ) }
Asynchronously sends the request to the authorization server and returns a Future.
Asynchronously sends the request to the authorization server and returns a Future .
self
http_client
C
self
http_client
C