Home
last modified time | relevance | path

Searched refs:content_type (Results 1 – 3 of 3) sorted by relevance

/tonic/tests/web/tests/
H A Dgrpc_web.rs29 let content_type = res.headers().get(header::CONTENT_TYPE).unwrap().clone(); in binary_request() localVariable
30 let content_type = content_type.to_str().unwrap(); in binary_request() localVariable
33 assert_eq!(content_type, "application/grpc-web+proto"); in binary_request()
35 let (message, trailers) = decode_body(res.into_body(), content_type).await; in binary_request()
53 let content_type = content_type.to_str().unwrap(); in text_request() localVariable
56 assert_eq!(content_type, "application/grpc-web-text+proto"); in text_request()
58 let (message, trailers) = decode_body(res.into_body(), content_type).await; in text_request()
118 let bytes = match content_type { in build_request()
123 _ => panic!("invalid content type {}", content_type), in build_request()
128 .header(CONTENT_TYPE, format!("application/{}", content_type)) in build_request()
[all …]
/tonic/tonic-web/src/
H A Dservice.rs100 debug!(kind = "other h2", content_type = ?req.headers().get(header::CONTENT_TYPE)); in call()
110 debug!(kind = "other h1", content_type = ?req.headers().get(header::CONTENT_TYPE)); in call()
H A Dcall.rs28 content_type(headers), in is_grpc_web()
33 fn content_type(headers: &HeaderMap) -> Option<&str> { in content_type() function