0
I’m setting up an API in Flask and the request is as follows:
Request: http://127.0.0.1:5000/integra
json = {"recev": {"doc":"123456"} }
I’m trying to get the key value "doc"
, but to no avail:
from flask_restful import Resource, reqparse
class Processa(Resource):
def post(self):
argumentos = reqparse.RequestParser()
argumentos.add_argument('recev')
dados = argumentos.parse_args()
vdoc = dados{'doc':dados:['doc']}
return vdoc, 200