Hi. Can I use somehow `call.receiveParameters()` t...
# ktor
j
Hi. Can I use somehow
call.receiveParameters()
together with "Form Authentication"? Say I have username/password validated via Authentication plugin, but also in the form, there's more parameters I'd like to handle in my actual endpoint handling... right now if I go:
Copy code
install(Authentication) {
     form("foo") {
       validate { .... }
     }
   }
  authenticate("foo", optional = true)
   post("something") { 
     val params = call.formParameters() 
     ...
   }
 }
All I get is
Request body has already been consumed (received).
o
You should use double receive plugin https://ktor.io/docs/server-double-receive.html#install_plugin I guess we should mention this use-case in the Docs @Bruce Hamilton wdyt?
b
Yes, DoubleReceive is made for these kinds of scenarios 👍
j
🙇 thanks folks!
any serious risks that this "Experimental API" will be somehow removed from future versions?
(ah no, it's still experimental in docs, not really in the code 🙂 )
b
Oh, we should remove that... there's nothing experimental about it now
👍 1