mercredi 1 mai 2019

Let the user send requests instead flask python

I want the user to make a get request to another site to gather data from there, which he will later send as a post request to my flask server. At the moment my flask server does all the data requesting, but I want to replace that.

I have tried making the request in a route, but that didn't help. All requests were done by my server again.

@app.route("/")
def home():
    r = requests.get(url).text
    p = remove_things(r)
    return p

What I want is that the user should make that get request instead of my server.




Aucun commentaire:

Enregistrer un commentaire