diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2021-12-21 13:40:22 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-21 13:40:22 +1100 |
commit | b5fdfb9d25a636725d3aeae055bd1e740f6ec1d6 (patch) | |
tree | 756f972e25e272af64991506f5bdc1803cee754c /test_util/src/lib.rs | |
parent | 1eb78731eb57b1d0eb7c0ece97b2018c1724989e (diff) |
feat(lsp): supply accept header when fetching registry config (#13159)
Closes #13153
Diffstat (limited to 'test_util/src/lib.rs')
-rw-r--r-- | test_util/src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs index 4ad6f1c3c..79afdde12 100644 --- a/test_util/src/lib.rs +++ b/test_util/src/lib.rs @@ -912,6 +912,13 @@ async fn main_server( ); Ok(res) } + (_, "/echo_accept") => { + let accept = req.headers().get("accept").map(|v| v.to_str().unwrap()); + let res = Response::new(Body::from( + serde_json::json!({ "accept": accept }).to_string(), + )); + Ok(res) + } _ => { let mut file_path = testdata_path(); file_path.push(&req.uri().path()[1..]); |