6

i am using python flask in my application. I want to change the header before each request in order to add information for zipkin distributed tracing. My current code looks like:

@app.before_request
def before_request():
    headers={}
    headers.update(zipkin.create_http_headers_for_new_span())
    request.headers.append(headers)

Unfortunately, this is not working as the method append does not exist. What is the right approach?

Best regards Martin

Martin
  • 61
  • 3
  • 2
    @cfreak The link you send me changes the headers in a response. I do not want to add headers in a response. I need to add headers everytime before i send a request. The links you provided is not the solution – Martin Jul 10 '18 at 08:43

0 Answers0