falconry / falconry/falcon

How to add a uri template pattern and control it in resource?

Open
#690 7 comments 0 reactions 0 assignees View on GitHub
documentation
Dominant language
Python
Stars
9.8k
Forks
1k
Avg merge
5d 13h
Merged PRs (30d)
7

Description

I have a example case:

resource:
import falcon

class Resource(object):

```
def search(self, req, resp):
resp.body = '{"message": "Hello world!"}'
resp.status = falcon.HTTP_200
```

add resource to route
api = application = falcon.API()

api.add_route('/resource', Resource())

How to setup falcon while I request to uri: /resource/search -> redirect to function search in resource ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.