MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / build_client

Function build_client

crates/cli/src/api.rs:36–46  ·  view source on GitHub ↗
(con: &Connection)

Source from the content-addressed store, hash-verified

34}
35
36pub fn build_client(con: &Connection) -> Client {
37 let mut builder = Client::builder().user_agent(APP_USER_AGENT);
38
39 if let Some(auth_header) = con.auth_header.to_header() {
40 let headers = http::HeaderMap::from_iter([(header::AUTHORIZATION, auth_header)]);
41
42 builder = builder.default_headers(headers);
43 }
44
45 builder.build().unwrap()
46}
47
48pub struct ClientApi {
49 pub con: Connection,

Callers 1

newMethod · 0.85

Calls 3

to_headerMethod · 0.80
unwrapMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…