Hello guys,
I'm testing the form's processing and it behaves wierd.
my form:
<html>
<body>
<form method="POST" action = "/"><input name="param" type="text"/><input type="submit"/></form>
<br>
Submitted: {{submitted}}
</body>
</html>
My server code:
app.post("/") { (request:Request<AnyContent>)->Action<AnyContent> in
print("Params:" ,request.params)
print("Query:", request.query)
return Action<AnyContent>.render("index",context: ["submitted": ""])
}
app.get("/") { (request:Request<AnyContent>)->Action<AnyContent> in
return Action<AnyContent>.render("index",context: ["submitted": ""])
}
The result is:
Merged: ["param": ["12345", "12345"]]
Query: ["param": ["12345"]]
Seems like mergedQuery adds the same value twice??? Why?? What query and mergedQuery are expected to be then?
Hello guys,
I'm testing the form's processing and it behaves wierd.
my form:
My server code:
The result is:
Merged: ["param": ["12345", "12345"]]
Query: ["param": ["12345"]]
Seems like mergedQuery adds the same value twice??? Why?? What query and mergedQuery are expected to be then?