Re: MethodDispatcher and overloading

"Joseph S. Tate" <[email protected]>
Newsgroups gmane.comp.python.cherrypy
Message-ID <CA+WDQbEXkryjYUVRZetjbitfGp7AqkAagV1CiCDaZGc4UVw78Q@mail.gmail.com>
I don't think you can do this with MethodDispatcher (patches are welcome
however). You'd need to be able to name them differently in the class.

You should be able to do this with the RoutesDispatcher though, either with
GET parameters as positional arguments or as query arguments.

This is one of the things we hope to fix up in future iterations of
CherryPy.

On Mon, May 2, 2016 at 10:35 AM Aaron Dalton <[email protected]>
wrote:

> So I'm using MethodDispatcher but I need to handle two different forms of
> a specific GET request (with different parameter sets). I did two different
> GET functions with different signatures, but that didn't work. So then I
> removed all arguments and tried to use "fields.get()", but the request
> fails because it can't find a GET with a matching signature. What's the
> right way to do overloading with MethodDispatcher?
>
> --
> You received this message because you are subscribed to the Google Groups
> "cherrypy-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
> To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
> Visit this group at https://groups.google.com/group/cherrypy-users.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.