MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / send_backend_request_streaming

Function send_backend_request_streaming

crates/openshell-router/src/backend.rs:361–371  ·  view source on GitHub ↗

Build and send an HTTP request without a total request timeout. For streaming responses, the total duration is unbounded — liveness is enforced by the caller's per-chunk idle timeout instead. Connection establishment is still bounded by the client-level `connect_timeout`.

(
    client: &reqwest::Client,
    route: &ResolvedRoute,
    method: &str,
    path: &str,
    headers: &[(String, String)],
    body: bytes::Bytes,
)

Source from the content-addressed store, hash-verified

359/// enforced by the caller's per-chunk idle timeout instead. Connection
360/// establishment is still bounded by the client-level `connect_timeout`.
361async fn send_backend_request_streaming(
362 client: &reqwest::Client,
363 route: &ResolvedRoute,
364 method: &str,
365 path: &str,
366 headers: &[(String, String)],
367 body: bytes::Bytes,
368) -> Result<reqwest::Response, RouterError> {
369 let (builder, url) = prepare_backend_request(client, route, method, path, headers, body, true)?;
370 builder.send().await.map_err(|e| map_send_error(e, &url))
371}
372
373/// Validation probes for a route, in preference order.
374///

Callers 1

Calls 2

prepare_backend_requestFunction · 0.85
map_send_errorFunction · 0.85

Tested by

no test coverage detected