I am learning the Flask framework, and I want to create a web service in Flask using a POST method.
Below is the method which I created using GET:
Flask.py
from flask import Flask, jsonify
import requests
app = Flask(__name__)
@app.route('/<name>',methods=['GET'])
def index(name):
return jsonify({ 'out': "Hello" + " " + str(name)})
So here I want to give a name to get output but I need a web service that uses a POST method where I am not passing a name
and then verify my output using postman tool.
if __name__== "__main__":
app.run(debug=True)