Complete the code to import the Flask module correctly.
from flask import [1]
The Flask class is imported from the flask module to create the app instance.
Complete the code to access JSON data from a POST request.
data = [1].get_json()The request object provides access to the incoming request data, including JSON.
Fix the error in the route decorator to accept POST requests.
@app.route('/submit', methods=[[1]])
The route must specify 'POST' in the methods list to accept POST requests.
Fill both blanks to return a JSON response with a message and status code 200.
return [1]({'message': 'Success'}), [2]
jsonify creates a JSON response and 200 is the HTTP status code for success.
Fill all three blanks to parse JSON, extract 'name', and return a greeting message.
data = [1].get_json() name = data.get([2], 'Guest') return [3]({'greeting': f'Hello, {name}!'})
Use request.get_json() to get JSON data, extract the 'name' key, and use jsonify to return JSON response.
