My backend takes time to fetch the data but till then , I have to wait for it to respond. Instead what I want is to show a response and when the data in the backend is processed , the server displays it. I am trying to do this using RestPlus(flask) and not able to do this.
I have created an api and i have called "api.response" method as soon as the url is called but it is not giving the server response.
@api.route('/hello')
class Hello(Resource):
@api.response(code=200,description='hello world')
def get(self):
sleep(10)
return 'Hello X'