I've just started reading "Learn Ratpack", in one of the examples from the very beginning of the book, the author uses 'all', 'byMethod', 'get' and 'post' to exemplify how to parse request data, the way that he does it work, but I've tried using 'prefix', 'get' and 'post' but I can't get the same result, it's returning 405-Method Not Allowed.
I tried to find something in the docs, but I couldn't see why the behavior with 'prefix'.
Example version
import static ratpack.groovy.Groovy.ratpack
import ratpack.form.Form
ratpack {
handlers {
all {
byMethod {
get {
//In the exemple he sends a html form
}
post {
//And here he parses it.
}
}
}
}
}
405 version
import static ratpack.groovy.Groovy.ratpack
import ratpack.form.Form
ratpack {
handlers {
prefix("parsing-request-data") {
get{
//From here all the same
That's it, what am I missing?