Function encode_request_target
pub fn encode_request_target(
method: &Method,
uri: &Uri,
extensions: &Extensions,
output: &mut BytesMut,
) -> Result<(), HeadError>Available on crate features
http and std only.Expand description
Encode the HTTP/1 request-target selected by Rama connection metadata.
Direct requests use origin-form, CONNECT uses authority-form, OPTIONS * uses asterisk-form, and insecure requests on an established HTTP forward
proxy connection use absolute-form. Userinfo and fragments are never
emitted. Route intent is deliberately ignored: the established connection
route is the only authoritative signal after fallback and pool selection.
When an Egress connection snapshot is
present, its route (including absence) takes precedence over request-local
metadata. Low-level callers without a connection snapshot must insert
EstablishedProxyRoute::Forward themselves.