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

Inheritance of service urls #11

Open
llonchj opened this issue Apr 24, 2013 · 2 comments
Open

Inheritance of service urls #11

llonchj opened this issue Apr 24, 2013 · 2 comments

Comments

@llonchj
Copy link
Contributor

llonchj commented Apr 24, 2013

I am trying corepost. Looks great!

With the following code running, a call to http://0.0.0.0:8000/test results to status=404, body=URL '/test' not found. It should be: status = 200, body = /test ?

from corepost.web import route, RESTResource
from corepost.enums import Http

class OneService():
    @route("/test")
    def test(self,request,**kwargs):
        return request.path

class OtherRESTService(OneService):
    @route("/test2")
    def root(self,request,**kwargs):
        return request.path

if __name__ == '__main__':
    app = RESTResource(services=(OtherRESTService(),))
    app.run(8000)
@jacek99
Copy link
Owner

jacek99 commented Apr 24, 2013

not sure I get the point :-/

you would create duplicate URL handlers all over the place, no?

Could you give me a valid example of why this would be useful?

@jacek99 jacek99 closed this as completed Apr 24, 2013
@jacek99 jacek99 reopened this Apr 24, 2013
@llonchj
Copy link
Contributor Author

llonchj commented Apr 24, 2013

A plugin that extends a service with new endpoints. This is the main trigger for this issue found integrating corepost into Scrapyd (www.scrapy.org).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants