0

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!

ryan.chen
  • 33
  • 6
  • I want to get the query text in botium-box , then I can transfer this message to my own nlp web chatbot. – ryan.chen Aug 17 '20 at 07:44
  • quickstart has only a limited set of config options for the connector. open the Chatbots menu, register a new chatbot and go to the settings section - there you can configure request body and headers – Florian Treml Aug 17 '20 at 13:26
  • Thank for your assistance. I success to send message to my chatbot. [https://i.imgur.com/daDOJIe.png](https://i.imgur.com/daDOJIe.png) – ryan.chen Aug 18 '20 at 06:29

0 Answers0