This commit is contained in:
louiscklaw
2025-01-31 22:59:12 +08:00
parent b3cc8e8323
commit 2f380a6c09
201 changed files with 31229 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
from flask import Flask, jsonify
app = Flask(__name__)
@app.route("/api/data")
def get_data():
data = {"name": "John", "age": 30, "city": "New York"}
return jsonify(data)
if __name__ == "__main__":
app.run()

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
# curl -X POST -H "Content-Type: application/json" -d '{"name":"John Doe","age":30}' http://localhost:5000/api/data
curl http://localhost:5000/api/data