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

Function make_request

sdks/rust/src/websocket.rs:229–244  ·  view source on GitHub ↗
(
    host: Uri,
    db_name: &str,
    token: Option<&str>,
    connection_id: Option<ConnectionId>,
    params: WsParams,
)

Source from the content-addressed store, hash-verified

227
228#[cfg(not(feature = "browser"))]
229fn make_request(
230 host: Uri,
231 db_name: &str,
232 token: Option<&str>,
233 connection_id: Option<ConnectionId>,
234 params: WsParams,
235) -> Result<http::Request<()>, WsError> {
236 let uri = make_uri(host, db_name, connection_id, params)?;
237 let mut req = IntoClientRequest::into_client_request(uri.clone()).map_err(|source| WsError::Tungstenite {
238 uri,
239 source: Arc::new(source),
240 })?;
241 request_insert_protocol_header(&mut req);
242 request_insert_auth_header(&mut req, token);
243 Ok(req)
244}
245
246#[cfg(not(feature = "browser"))]
247fn request_insert_protocol_header(req: &mut http::Request<()>) {

Callers 1

connectMethod · 0.85

Calls 6

make_uriFunction · 0.85
newFunction · 0.50
OkFunction · 0.50
cloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…