"HFoodle" or what about HF's XML Http Request API


#1

Hello,

I need to investigate an integrated prototype combining HF with Moodle, #1 open source learning management system platform, big web app most written in php, with rich and open API and common protocol services (SOAP, XML-RPC and REST).

Background : some years ago, teams worked on SLOODLE https://www.sloodle.org/
which mostly uses LSL Http Request from scripts written in SL’s proprietary scripting language, for communications with Moodle.

May I ask some questions:

  • the HF wiki doc only “lists” an HF XML Http Request API : do you have details/specs of this API ? do you have exemples (in Javascript) using this API ?
  • are there other HF APIs for communications over HTTP with web app platforms, accessible from Javascript ?

Thank you in advance for your responses … and examples !
-michel


#2

You can use the standard javascript XMLHttpRequest() to communicate with the web, I just tried and it has worked. (you will found a lot of info about this on the web)
(I tried a “get” sync. transaction. I suppose it will also work for a post)

I supposed that you need to have your script hosted on your web server… you might hit the cross-domain protection otherwise (I have not made any test)

here what I tried:

function httpGet(theUrl)
{
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( “GET”, theUrl, false ); // false for synchronous request
xmlHttp.send( null );
return xmlHttp.responseText;
}


#3

Thank you Alezia !
-michel