Flask-RESTful Documentation Release 0.3.10flask_restful import reqparse parser = reqparse.RequestParser() parser.add_argument('rate', type=int, help='Rate to charge for this resource') args = parser.parse_args() Note Unlike the argparse module Flask-RESTful will respond with a 400 Bad Request and a response highlighting the error. $ curl -d 'rate=foo' http://127.0.0.1:5000/todos {'status': 400, 'message': 'foo cannot be converted to int'} The flask_restful import reqparse parser = reqparse.RequestParser() parser.add_argument('rate', type=int, help='Rate cannot be converted') parser.add_argument('name') args = parser.parse_args() Note The0 码力 | 42 页 | 84.60 KB | 1 年前3
Debian GNU/Linux 安装手册
January 8, 2024b’’ Ty Coon b’’ 公 b’’b’’ 司 b’’b’’,b’’b’’ 副 b’’b’’ 总 b’’b’’ 裁 b’’ 本通用公共授权并不允许您将本程序并入专有程序中。若您的程序是一子程序函数库时,您可能认为 允许专有应用程序与该函式库相连结会更有帮助。若这是您所想做的,请使用 GNU 函式库通用公共授权 代替本授权。 830 码力 | 93 页 | 562.93 KB | 1 年前3
共 2 条
- 1













