Home
last modified time | relevance | path

Searched refs:headers (Results 1 – 22 of 22) sorted by relevance

/tonic/tonic/src/metadata/
H A Dmap.rs38 headers: http::HeaderMap, field
43 &self.headers in as_ref()
49 &mut self.headers in as_mut()
263 self.headers in into_headers()
270 self.headers in into_sanitized_headers()
1229 self.headers.extend(other.headers); in merge()
2052 map.headers in insert()
2074 map.headers in insert()
2098 map.headers in insert()
2156 map.headers in get()
[all …]
/tonic/tonic-web/src/
H A Dcall.rs26 pub(crate) fn is_grpc_web(headers: &HeaderMap) -> bool { in is_grpc_web()
28 content_type(headers), in is_grpc_web()
33 fn content_type(headers: &HeaderMap) -> Option<&str> { in content_type()
353 Self::from_header(headers.get(header::CONTENT_TYPE)) in from_content_type()
357 Self::from_header(headers.get(header::ACCEPT)) in from_accept()
524 let mut headers = HeaderMap::new(); in encoding_constructors() localVariable
537 let mut headers = HeaderMap::new(); in decode_trailers() localVariable
538 headers.insert(Status::GRPC_STATUS, 0.into()); in decode_trailers()
539 headers.insert( in decode_trailers()
544 let trailers = make_trailers_frame(headers.clone()); in decode_trailers()
[all …]
H A Dservice.rs61 match RequestKind::new(req.headers(), req.method(), req.version()) { in call()
100 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()
190 fn new(headers: &'a HeaderMap, method: &'a Method, version: Version) -> Self { in new()
191 if is_grpc_web(headers) { in new()
194 encoding: Encoding::from_content_type(headers), in new()
195 accept: Encoding::from_accept(headers), in new()
/tonic/tonic/src/server/
H A Dgrpc.rs230 req.headers(), in unary()
274 req.headers(), in server_streaming()
314 req.headers(), in client_streaming()
348 req.headers(), in streaming()
435 .headers in map_response()
441 parts.headers.insert( in map_response()
463 request.headers(), in request_encoding_if_supported()
/tonic/tonic/src/
H A Dresponse.rs76 metadata: MetadataMap::from_headers(head.headers), in from_http()
153 assert!(http_response.headers().is_empty()); in reserved_headers_are_excluded()
H A Drequest.rs162 metadata: MetadataMap::from_headers(parts.headers), in from_http_parts()
462 assert!(http_request.headers().is_empty()); in reserved_headers_are_excluded()
/tonic/tonic/src/transport/service/
H A Dgrpc_timeout.rs42 let client_timeout = try_parse_grpc_timeout(req.headers()).unwrap_or_else(|e| { in call()
104 headers: &HeaderMap<HeaderValue>, in try_parse_grpc_timeout()
106 let Some(val) = headers.get(GRPC_TIMEOUT_HEADER) else { in try_parse_grpc_timeout()
/tonic/tests/web/tests/
H A Dgrpc_web.rs29 let content_type = res.headers().get(header::CONTENT_TYPE).unwrap().clone(); in binary_request()
52 let content_type = res.headers().get(header::CONTENT_TYPE).unwrap().clone(); in text_request()
/tonic/tonic/src/service/
H A Dinterceptor.rs279 .headers() in doesnt_remove_headers_from_requests()
326 assert_eq!(expected.headers(), response.headers()); in handles_intercepted_status_as_response()
/tonic/tests/compression/src/
H A Dcompressing_request.rs38 assert_eq!(req.headers().get("grpc-encoding").unwrap(), expected); in client_enabled_server_enabled()
102 let req_encoding = req.headers().get("grpc-encoding").unwrap(); in client_enabled_server_enabled_multi_encoding()
H A Dclient_stream.rs38 assert_eq!(req.headers().get("grpc-encoding").unwrap(), expected); in client_enabled_server_enabled()
94 assert!(req.headers().get("grpc-encoding").is_none()); in client_disabled_server_enabled()
H A Dbidirectional_stream.rs41 assert_eq!(req.headers().get("grpc-encoding").unwrap(), expected); in client_enabled_server_enabled()
H A Dutil.rs167 assert_eq!(req.headers().get("grpc-encoding").unwrap(), expected); in call()
H A Dcompressing_response.rs44 req.headers() in client_enabled_server_enabled()
223 assert!(req.headers().get("grpc-accept-encoding").is_none()); in client_disabled()
/tonic/tonic-health/src/generated/
H A Dgrpc_health_v1.rs425 let headers = response.headers_mut(); in call() localVariable
426 headers in call()
431 headers in call()
/tonic/interop/src/
H A Dserver.rs197 let echo_header = req.headers().get("x-grpc-test-echo-initial").cloned(); in call()
201 .headers() in call()
/tonic/tonic-reflection/src/generated/
H A Dgrpc_reflection_v1.rs427 let headers = response.headers_mut(); in call() localVariable
428 headers in call()
433 headers in call()
H A Dgrpc_reflection_v1alpha.rs427 let headers = response.headers_mut(); in call() localVariable
428 headers in call()
433 headers in call()
/tonic/tonic/src/client/
H A Dgrpc.rs334 response.headers(), in create_response()
339 let trailers_only_status = Status::from_header_map(response.headers()); in create_response()
/tonic/tonic-build/src/
H A Dserver.rs169 let headers = response.headers_mut(); in generate_internal() localVariable
170headers.insert(tonic::Status::GRPC_STATUS, (tonic::Code::Unimplemented as i32).into()); in generate_internal()
171headers.insert(http::header::CONTENT_TYPE, tonic::metadata::GRPC_CONTENT_TYPE); in generate_internal()
/tonic/interop/proto/grpc/testing/
H A Dtest.proto35 // headers set such that a caching HTTP proxy (such as GFE) can
/tonic/
H A DCHANGELOG.md376 * **tonic:** don't remove reserved headers in interceptor ([#701](https://github.com/hyperium/tonic…
394 * **tonic:** pass `trace_fn` the request rather than just the headers ([#634](https://github.com/hy…
431 * Revert "Remove grpc-timeout header from reserved headers (#603)" ([7aaa2f8](https://github.com/hy…