Skip to content

Inheritance of service urls #11

@llonchj

Description

@llonchj

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions