[dancer-users] Why is Dancer2 mixing POST and GET params?

Russell Jenkins russell.jenkins at strategicdata.com.au
Sat Jan 10 12:31:12 GMT 2015


Hey Gabor.

On 10/01/2015 9:49 pm, Gabor Szabo wrote:
> I wonder wouldn't it be better to have separate param() functions for 
> values received in the URL and values received in the POST request?

You can use the `params` keyword to access the various sources of params 
including 'query', 'route', or 'body'.
eg.
   my $body_params = params('body'); #hashref of only the body params

> Or in other words, could someone explain why was the decision to unite 
> these input channels?
>
This is what Sinatra does and hence what Dancer does.

Hope that helps,
    Russell.



More information about the dancer-users mailing list