This is my demo code:
from flask import Flask , jsonify, request, render_template
import json
app = Flask(__name__)
@app.route('/t',methods=['GET','POST'])
def t():
print(request.data)
print (request.headers)
return jsonify({"test":"test"})
if __name__ =='__main__':
app.run(debug=True,host="0.0.0.0",port=5000)
When I use the Generic HTTP(S)/JSON Connector and to Click CHECK CONNECTIVITY Button, it response a "test" for text.
but I see the logs , the header is empty. The logs is below:
192.168.58.119 - - [17/Aug/2020 15:24:35] "[37mGET /t HTTP/1.1[0m" 200 -
b''
Host: 192.168.58.145:5000
Connection: close
The connectivity is successful.
How to get the botium box query text in the http headers?
thanks!