Node - #activity#call_http
- For Xmind ChatTree, the first line of the node content must be "#activity#call_http", and then the content of the second line is the HTTP url content, such as:
#activity#call_http
https://www.abc.com?...=...&...={...} - For Python ChatTree, the first parameter of chattree.create_node() must be "#activity#call_http", the key in the second parameter dict is "url", and the value is the HTTP url link content (str type), such as:
call_http_node = chattree.create_node("#activity#call_http", {
"url": "https://www.abc.com?...=...&...={...}",
}) - Call the HTTP API interface (of an external system) based on the HTTP GET format. The parameter passed is the query string part after the "?" of the url (the query string part can embed the name of the InfoItem, and the system will replace the name of the InfoItem with the value of the InfoItem during execution, as in the example above)
- The returned value (if any) must be in the text format "{...}=...|{...}=...|{...}=..." format (separated by "|"), that is, the return value can only be obtained through assignment of InfoItems
- This node only implements the simplest call. If you need a more complex HTTP POST method, you can use the Python script in "#activity#execute_script" to implement it yourself based on "requests"
- If an error is reported for the HTTP interface called by this section, the call result must start with
error\nto return the result. - "911" ChatTree example in "ChatTree Examples" has this node