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

Method to_header

crates/cli/src/util.rs:193–199  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

191}
192impl AuthHeader {
193 pub fn to_header(&self) -> Option<http::HeaderValue> {
194 self.token.as_ref().map(|token| {
195 let mut val = http::HeaderValue::try_from(["Bearer ", token].concat()).unwrap();
196 val.set_sensitive(true);
197 val
198 })
199 }
200}
201
202pub const VALID_PROTOCOLS: [&str; 2] = ["http", "https"];

Callers 2

build_clientFunction · 0.80
subscribe_requestFunction · 0.80

Calls 3

mapMethod · 0.45
as_refMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected