Falcon v3.0.0 Documentationit is flexible enough to accomodate other paradigms. Consider the task of building an API for a calculator which can both add and subtract two numbers. You could implement the following: class Add(): Responders, we can do just that, rewriting the example above in a more procedural style: class Calculator(): def on_get_add(self, req, resp): resp.text = str(req.get_param_as_int('x') + req.get_param_as_int('y')) Chapter 5. Documentation Falcon Documentation, Release 3.0.0 (continued from previous page) calc = Calculator() app = falcon.App() app.add_route('/add', calc, suffix='add') app.add_route('/subtract', calc0 码力 | 344 页 | 1.16 MB | 1 年前3
Falcon v3.0.1 Documentationit is flexible enough to accomodate other paradigms. Consider the task of building an API for a calculator which can both add and subtract two numbers. You could implement the following: class Add(): Responders, we can do just that, rewriting the example above in a more procedural style: class Calculator(): def on_get_add(self, req, resp): resp.text = str(req.get_param_as_int('x') + req.get_param_as_int('y')) Chapter 5. Documentation Falcon Documentation, Release 3.0.1 (continued from previous page) calc = Calculator() app = falcon.App() app.add_route('/add', calc, suffix='add') app.add_route('/subtract', calc0 码力 | 344 页 | 1.16 MB | 1 年前3
Falcon v3.1.1-b3 Documentationit is flexible enough to accomodate other paradigms. Consider the task of building an API for a calculator which can both add and subtract two numbers. You could implement the following: class Add(): Responders, we can do just that, rewriting the example above in a more procedural style: class Calculator(): def on_get_add(self, req, resp): resp.text = str(req.get_param_as_int('x') + req.get_param_as_int('y')) str(req.get_param_as_int('x') - req.get_param_as_int('y')) resp.status = falcon.HTTP_200 calc = Calculator() app = falcon.App() app.add_route('/add', calc, suffix='add') app.add_route('/subtract', calc0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1-b1 Documentationit is flexible enough to accomodate other paradigms. Consider the task of building an API for a calculator which can both add and subtract two numbers. You could implement the following: class Add(): Responders, we can do just that, rewriting the example above in a more procedural style: class Calculator(): def on_get_add(self, req, resp): resp.text = str(req.get_param_as_int('x') + req.get_param_as_int('y')) str(req.get_param_as_int('x') - req.get_param_as_int('y')) resp.status = falcon.HTTP_200 calc = Calculator() app = falcon.App() app.add_route('/add', calc, suffix='add') app.add_route('/subtract', calc0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1-a Documentationit is flexible enough to accomodate other paradigms. Consider the task of building an API for a calculator which can both add and subtract two numbers. You could implement the following: class Add(): Responders, we can do just that, rewriting the example above in a more procedural style: class Calculator(): def on_get_add(self, req, resp): resp.text = str(req.get_param_as_int('x') + req.get_param_as_int('y')) str(req.get_param_as_int('x') - req.get_param_as_int('y')) resp.status = falcon.HTTP_200 calc = Calculator() app = falcon.App() app.add_route('/add', calc, suffix='add') app.add_route('/subtract', calc0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.0 Documentationit is flexible enough to accomodate other paradigms. Consider the task of building an API for a calculator which can both add and subtract two numbers. You could implement the following: class Add(): Responders, we can do just that, rewriting the example above in a more procedural style: class Calculator(): def on_get_add(self, req, resp): resp.text = str(req.get_param_as_int('x') + req.get_param_as_int('y')) str(req.get_param_as_int('x') - req.get_param_as_int('y')) resp.status = falcon.HTTP_200 calc = Calculator() app = falcon.App() app.add_route('/add', calc, suffix='add') app.add_route('/subtract', calc0 码力 | 362 页 | 1.29 MB | 1 年前3
Falcon v3.1.1 Documentationit is flexible enough to accomodate other paradigms. Consider the task of building an API for a calculator which can both add and subtract two numbers. You could implement the following: class Add(): Responders, we can do just that, rewriting the example above in a more procedural style: class Calculator(): def on_get_add(self, req, resp): resp.text = str(req.get_param_as_int('x') + req.get_param_as_int('y')) str(req.get_param_as_int('x') - req.get_param_as_int('y')) resp.status = falcon.HTTP_200 calc = Calculator() app = falcon.App() app.add_route('/add', calc, suffix='add') app.add_route('/subtract', calc0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1-rc1 Documentationit is flexible enough to accomodate other paradigms. Consider the task of building an API for a calculator which can both add and subtract two numbers. You could implement the following: class Add(): Responders, we can do just that, rewriting the example above in a more procedural style: class Calculator(): def on_get_add(self, req, resp): resp.text = str(req.get_param_as_int('x') + req.get_param_as_int('y')) str(req.get_param_as_int('x') - req.get_param_as_int('y')) resp.status = falcon.HTTP_200 calc = Calculator() app = falcon.App() app.add_route('/add', calc, suffix='add') app.add_route('/subtract', calc0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1 Documentationit is flexible enough to accomodate other paradigms. Consider the task of building an API for a calculator which can both add and subtract two numbers. You could implement the following: class Add(): Responders, we can do just that, rewriting the example above in a more procedural style: class Calculator(): def on_get_add(self, req, resp): resp.text = str(req.get_param_as_int('x') + req get_param_as_int('x') - req.get_param_as_int('y')) resp.status = falcon.HTTP_200 calc = Calculator() app = falcon.App() app.add_route('/add', calc, suffix='add') app.add_route('/subtract', calc0 码力 | 540 页 | 476.60 KB | 1 年前3
Falcon v3.1.1-rc1 Documentationit is flexible enough to accomodate other paradigms. Consider the task of building an API for a calculator which can both add and subtract two numbers. You could implement the following: class Add(): Responders, we can do just that, rewriting the example above in a more procedural style: class Calculator(): def on_get_add(self, req, resp): resp.text = str(req.get_param_as_int('x') + req get_param_as_int('x') - req.get_param_as_int('y')) resp.status = falcon.HTTP_200 calc = Calculator() app = falcon.App() app.add_route('/add', calc, suffix='add') app.add_route('/subtract', calc0 码力 | 540 页 | 476.61 KB | 1 年前3
共 16 条
- 1
- 2













