MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / refresh_oauth_token

Method refresh_oauth_token

claw-code/rust/crates/api/src/client.rs:253–271  ·  view source on GitHub ↗
(
        &self,
        config: &OAuthConfig,
        request: &OAuthRefreshRequest,
    )

Source from the content-addressed store, hash-verified

251 }
252
253 pub async fn refresh_oauth_token(
254 &self,
255 config: &OAuthConfig,
256 request: &OAuthRefreshRequest,
257 ) -> Result<OAuthTokenSet, ApiError> {
258 let response = self
259 .http
260 .post(&config.token_url)
261 .header("content-type", "application/x-www-form-urlencoded")
262 .form(&request.form_params())
263 .send()
264 .await
265 .map_err(ApiError::from)?;
266 let response = expect_success(response).await?;
267 response
268 .json::<OAuthTokenSet>()
269 .await
270 .map_err(ApiError::from)
271 }
272
273 async fn send_with_retry(
274 &self,

Callers 1

Calls 2

expect_successFunction · 0.85
form_paramsMethod · 0.80

Tested by

no test coverage detected