pub fn proxy<A>(
request: &Request,
config: ProxyConfig<A>,
) -> Result<Response, ProxyError>where
A: ToSocketAddrs,
Expand description
Sends the request to another HTTP server using the configuration.
If the function fails to get a response from the target, an error is returned. If you want
to instead return a response with a status code such as 502 (Bad Gateway
) or 504
(Gateway Time-out
), see full_proxy
.
Note: Implementation is very hacky for the moment.
Note: SSL is not supported.