Write a program that contains a view function that can accept GET and POST requests. For a GET request, the function must return the following text I'm GETting some diamonds..., and Hey, there is an imPOSTor! for POST. Use the root URL (/).
Requests
Request duality
Report a typo
Write a program in Python 3
from flask import Flask, request
app = Flask('main')
@app.route('URL')
def main_view():
pass # your code here
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.