Request duality

Report a typo

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 (/).

Write a program in Python 3
from flask import Flask, request

app = Flask('main')

@app.route('URL')
def main_view():
pass # your code here
___

Create a free account to access the full topic