I am using Rust Rocket to create a simple web page.
When go to the index page "/":
#[get("/")]
fn page_index() -> &'static str {
r#"
<title>GCD Calculator</title>
<form action="/gcd" method="post">
<input type="text" name="n" />
<input type="text" name="n" />
<button type="submit">Compute GCD</button>
</form>
"#
}
Server console informs me
GET / text/html:
=> Matched: GET /
=> Outcome: Success
=> Response succeeded.
But my browser tells me that Content-Type is text / plain .
How to get Rocket to respond correctly using text / html . Am I doing something wrong or is Rocket doing?
source
share