Upgrade to our Diamond service and we will build you your own app for Android or iOS
Self, AIML, and scripting : How to call plain text with a json request

RE: How to call plain text with a json request

by admin posted Feb 28 2017, 20:11

I think the code you want is something like:

// Returns WordPress posts. state TeachEnglish { pattern "^ [verbo pronome pronomes] (to) *" answer Teaching(); function Teaching() { var text = Http.requestJSON("https://teacherbot.000webhostapp.com/wp-json/wp/v2/pages?slug=" + Http.encode(star[1])); text = json[0].content.rendered; text = text.replace("<p>", ""); text = text.replace("<\/p>", ""); text = text.replace("\n", ""); text = text.trim(); return text; } }


Id: 15620679
Posted: Feb 28 2017, 20:11
Replies: 0
Views: 603, today: 1, week: 1, month: 13
I'm sure
Flag post as offensive, or in violation of site rules