I have a flask server which get requests, and I want to send that raw request to a different flask server that is in charge of logging all of the requests made into my network.
I am trying to pass the original request (as is) to the logger flask application, but I am running into some trouble.
I tried sending request.dict, but it does not contain all the original data.
I also tried using pickle on the request
object, but I get an error while trying to dump it. my code:
import pickle
@app.route("/login", methods=['GET', 'POST'])
def login():
data = {'pickled': pickle.dumps(request)}
Error:
_pickle.PicklingError: args[0] from newobj args has the wrong class
Does anyone has any suggestions on how can I do such thing?