જોડાવા બોટ કાવ્ય ઓપન સોર્સ પ્રોજેક્ટ પર BotLibre.org
Bot Libre Forum : Connect your Bot to the World - XML, JSON, Web Services, HTML Scraping, Twitter, Facebook, Telegram, Email

RE: Connect your Bot to the World - XML, JSON, Web Services, HTML Scraping, Twitter, Facebook, Telegram, Email

દ્વારા bellts પોસ્ટ Jun 29 2016, 15:08

Well.... none of that worked. I'm assuming that this is only available on botlibre.com and NOT available via source code or supplied ai-engine.jar (ver 4.0).

I'm now trying a hack... which seems to work. I just can't figure out how to get the response from the call. I have validated that the call goes out (and I see the proper/valid response in the log). Any clue?

Sample code:

 

state tacosAI {

case input goto test;

state test
{


function thatsoWordState() {
//var result = Http.requestJSON("http://api.geonames.org/postalCodeSearchJSON?maxRows=1&username=botlibre&postalcode=92590");
var result = request (null, { server : "http://api.pathient.com/spectation/hello?nothing="});
if (result == null) {
return "Something went wrong.";
}
return result.code.content + " target";

}
}
}

 

Log:

INFO: botlibre_bots - Thread[pool-65-thread-1,5,main] -- RemoteService:Response - <code><content>hello</content></code>

 


ને: 13032894
પોસ્ટ: Jun 29 2016, 15:08
જવાબો: 0
જોવાઈ: 1702, આજે: 1, સપ્તાહ: 1, મહિને: 5
મને ખાતરી છે કે છું
ધ્વજ પોસ્ટ તરીકે અપમાનજનક, અથવા ઉલ્લંઘન સાઇટ નિયમો