MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / set_token

Method set_token

src/api_client.rs:56–59  ·  view source on GitHub ↗

Replace the token this client uses for authenticated GraphQL requests and that the uploader pulls for its `Authorization` header. The single mutation point for the credentials.

(&mut self, token: Option<String>)

Source from the content-addressed store, hash-verified

54 /// requests and that the uploader pulls for its `Authorization`
55 /// header. The single mutation point for the credentials.
56 pub fn set_token(&mut self, token: Option<String>) {
57 self.gql_client = build_gql_api_client(token.as_deref(), self.api_url.clone());
58 self.token = token;
59 }
60}
61
62fn build_gql_api_client(token: Option<&str>, api_url: String) -> GQLClient {

Callers 1

set_oidc_tokenMethod · 0.80

Calls 1

build_gql_api_clientFunction · 0.85

Tested by

no test coverage detected