|
@@ -26,7 +26,6 @@ fn json(mut context: Ctx, _chain: &MiddlewareChain<Ctx>) -> MiddlewareReturnValu
|
|
|
let val = serde_json::to_string(&json).unwrap();
|
|
|
|
|
|
context.body = val;
|
|
|
- context.set_header("Server".to_owned(), "thruster".to_owned());
|
|
|
context.set_header("Content-Type".to_owned(), "application/json".to_owned());
|
|
|
|
|
|
Box::new(future::ok(context))
|
|
@@ -36,7 +35,6 @@ fn plaintext(mut context: Ctx, _chain: &MiddlewareChain<Ctx>) -> MiddlewareRetur
|
|
|
let val = "Hello, world!".to_owned();
|
|
|
|
|
|
context.body = val;
|
|
|
- context.set_header("Server".to_owned(), "thruster".to_owned());
|
|
|
context.set_header("Content-Type".to_owned(), "text/plain".to_owned());
|
|
|
|
|
|
Box::new(future::ok(context))
|