Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple JSONRPCSites are not supported #13

Closed
rayrapetyan opened this issue Feb 28, 2014 · 6 comments
Closed

Multiple JSONRPCSites are not supported #13

rayrapetyan opened this issue Feb 28, 2014 · 6 comments
Labels

Comments

@rayrapetyan
Copy link

_site_api always uses default_site, so you can't define separate JSONRPCSites for different JSONRPC instances, which means you can't use different URL paths accepting JSON queries with same method names (which may be very useful in REST apps handling many similar clients).
However, this issue is easy to fix - all you need is wrap "_site_api" to "View" class, define "dispatch_request" method which accepts "site" as param, and rewrite "add_url_rule"s, (use unique "endpoints" and pass self.site to View constructor).
I can provide this patch, but my version (installed from pip) differs from master branch.

nycholas added a commit that referenced this issue Feb 28, 2014
@nycholas
Copy link
Member

hello,

The defect was corrected associated with multiple sites and added an example[1].
Still missing the correct Web browseable API for multiple websites.

Verify that this partial solution solves your problem.

Thank you.

[1] - https://github.com/cenobites/flask-jsonrpc/tree/master/examples/multiplesite

@nycholas
Copy link
Member

Hi @rayrapetyan,

The fact, MethodViews is better than the current implementation.

Thanks!

@rayrapetyan
Copy link
Author

Thanks for prompt reply, your fix solved the problem! I'm a Python newbie, how to make it available through pip? pip install flask-jsonrpc installs some old version.

@nycholas
Copy link
Member

I have to generate a new version of flask-jsonrpc and submit to pip, but before need to fix problem with MethodViews and Web Browsable API.

You can upgrade your local release:

   $ git clone git@github.com:cenobites/flask-jsonrpc.git
   $ cd flask-jsonrpc
   $ python setup.py install

@rayrapetyan
Copy link
Author

Thank you so much for your help!

On 2/28/2014, 2:54:11 PM, Nycholas de Oliveira e Oliveira wrote:

I have to generate a new version of flask-jsonrpc and submit to pip,
but before need to fix problem with MethodViews and Web Browsable API.

You can upgrade your local release:

| $ git clone git@github.com:cenobites/flask-jsonrpc.git
$ cd flask-jsonrpc
$ python setup.py install
|


Reply to this email directly or view it on GitHub
#13 (comment).

@nycholas
Copy link
Member

nycholas commented Mar 2, 2014

The new version will be performed when the issue is resolved #12.

Thanks.

@nycholas nycholas added the bug label Mar 2, 2014
oriontvv added a commit to oriontvv/flask-jsonrpc that referenced this issue May 24, 2018
Fix cenobites#13 "decoding Unicode is not supported"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants