We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 882749b commit 5baa165Copy full SHA for 5baa165
src/util/request_proxy.rs
@@ -1,3 +1,5 @@
1
+//! A helper that wraps a request and can overwrite either the path or the method.
2
+
3
use std::{io::Read, net::SocketAddr};
4
5
use conduit::{Method, Request};
@@ -14,6 +16,7 @@ pub struct RequestProxy<'a> {
14
16
}
15
17
18
impl<'a> RequestProxy<'a> {
19
+ /// Wrap a request and overwrite the path with the provided value.
20
pub(crate) fn rewrite_path(req: RequestMutRef<'a>, path: &'a str) -> Self {
21
RequestProxy {
22
other: req,
@@ -22,6 +25,7 @@ impl<'a> RequestProxy<'a> {
25
23
26
24
27
28
+ /// Wrap a request and overwrite the method with the provided value.
29
pub(crate) fn rewrite_method(req: RequestMutRef<'a>, method: Method) -> Self {
30
31
0 commit comments