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.
RequestUtils::query()
1 parent fbb068f commit 04bac90Copy full SHA for 04bac90
src/util/request_helpers.rs
@@ -27,18 +27,11 @@ pub fn redirect(url: String) -> Response {
27
}
28
29
pub trait RequestUtils {
30
- fn query(&self) -> IndexMap<String, String>;
31
fn wants_json(&self) -> bool;
32
fn query_with_params(&self, params: IndexMap<String, String>) -> String;
33
34
35
impl<T: RequestPartsExt> RequestUtils for T {
36
- fn query(&self) -> IndexMap<String, String> {
37
- url::form_urlencoded::parse(self.uri().query().unwrap_or("").as_bytes())
38
- .into_owned()
39
- .collect()
40
- }
41
-
42
fn wants_json(&self) -> bool {
43
self.headers()
44
.get_all(header::ACCEPT)
0 commit comments