Flask-RESTful Documentation Release 0.3.10never be used in a production environment! Now open up a new prompt to test out your API using curl $ curl http://127.0.0.1:5000/ {"hello": "world"} Resourceful Routing The main building block provided like this: $ curl http://localhost:5000/todo1 -d "data=Remember the milk" -X PUT {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo1 {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo2 http://localhost:5000/todo2 -d "data=Change my brakepads" -X PUT {"todo2": "Change my brakepads"} $ curl http://localhost:5000/todo2 {"todo2": "Change my brakepads"} Or from python if you have the requests library0 码力 | 42 页 | 84.60 KB | 1 年前3
Flask-RESTful Documentation
Release 0.3.10never be used in a production environment! Now open up a new prompt to test out your API using curl $ curl http://127.0.0.1:5000/ {"hello": "world"} 1.2.2 Resourceful Routing The main building block like this: $ curl http://localhost:5000/todo1 -d "data=Remember the milk" -X PUT {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo1 {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo2 http://localhost:5000/todo2 -d "data=Change my brakepads" -X PUT {"todo2": "Change my brakepads"} $ curl http://localhost:5000/todo2 {"todo2": "Change my brakepads"} Or from python if you have the requests library0 码力 | 39 页 | 212.29 KB | 1 年前3
Flask-RESTful Documentation
Release 0.3.6never be used in a production environment! Now open up a new prompt to test out your API using curl $ curl http://127.0.0.1:5000/ {"hello": "world"} 1.2.2 Resourceful Routing The main building block like this: $ curl http://localhost:5000/todo1 -d "data=Remember the milk" -X PUT {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo1 {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo2 http://localhost:5000/todo2 -d "data=Change my brakepads" -X PUT {"todo2": "Change my brakepads"} $ curl http://localhost:5000/todo2 {"todo2": "Change my brakepads"} Or from python if you have the requests library0 码力 | 46 页 | 245.60 KB | 1 年前3
Flask-RESTful Documentation Release 0.3.6never be used in a production environment! Now open up a new prompt to test out your API using curl $ curl http://127.0.0.1:5000/ {"hello": "world"} Resourceful Routing The main building block provided like this: $ curl http://localhost:5000/todo1 -d "data=Remember the milk" -X PUT {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo1 {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo2 http://localhost:5000/todo2 -d "data=Change my brakepads" -X PUT {"todo2": "Change my brakepads"} $ curl http://localhost:5000/todo2 {"todo2": "Change my brakepads"} Or from python if you have the requests library0 码力 | 49 页 | 91.90 KB | 1 年前3
Flask-RESTful Documentation
Release 0.3.7never be used in a production environment! Now open up a new prompt to test out your API using curl $ curl http://127.0.0.1:5000/ {"hello": "world"} 1.2.2 Resourceful Routing The main building block like this: $ curl http://localhost:5000/todo1 -d "data=Remember the milk" -X PUT {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo1 {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo2 http://localhost:5000/todo2 -d "data=Change my brakepads" -X PUT {"todo2": "Change my brakepads"} $ curl http://localhost:5000/todo2 {"todo2": "Change my brakepads"} Or from python if you have the requests library0 码力 | 50 页 | 253.09 KB | 1 年前3
Flask-RESTful Documentation
Release 0.3.8never be used in a production environment! Now open up a new prompt to test out your API using curl $ curl http://127.0.0.1:5000/ {"hello": "world"} 1.2.2 Resourceful Routing The main building block like this: $ curl http://localhost:5000/todo1 -d "data=Remember the milk" -X PUT {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo1 {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo2 http://localhost:5000/todo2 -d "data=Change my brakepads" -X PUT {"todo2": "Change my brakepads"} $ curl http://localhost:5000/todo2 {"todo2": "Change my brakepads"} Or from python if you have the requests library0 码力 | 50 页 | 253.64 KB | 1 年前3
Flask-RESTful Documentation Release 0.3.8never be used in a production environment! Now open up a new prompt to test out your API using curl $ curl http://127.0.0.1:5000/ {"hello": "world"} Resourceful Routing The main building block provided like this: $ curl http://localhost:5000/todo1 -d "data=Remember the milk" -X PUT {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo1 {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo2 http://localhost:5000/todo2 -d "data=Change my brakepads" -X PUT {"todo2": "Change my brakepads"} $ curl http://localhost:5000/todo2 {"todo2": "Change my brakepads"} Or from python if you have the requests library0 码力 | 55 页 | 93.30 KB | 1 年前3
Flask-RESTful Documentation Release 0.3.7never be used in a production environment! Now open up a new prompt to test out your API using curl $ curl http://127.0.0.1:5000/ {"hello": "world"} Resourceful Routing The main building block provided like this: $ curl http://localhost:5000/todo1 -d "data=Remember the milk" -X PUT {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo1 {"todo1": "Remember the milk"} $ curl http://localhost:5000/todo2 http://localhost:5000/todo2 -d "data=Change my brakepads" -X PUT {"todo2": "Change my brakepads"} $ curl http://localhost:5000/todo2 {"todo2": "Change my brakepads"} Or from python if you have the requests library0 码力 | 55 页 | 93.21 KB | 1 年前3
共 8 条
- 1













