Web URL command

Post here issues and solutions that relate to MainLobby Server 3
Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Web URL command

Postby Art Dustman » Wed Jul 20, 2011 3:54 pm

Lets say I have a way to connect to ML thru a URL and I have a "get" and "post" method. I also can capture the response. Let's say I want to do math and capture the result.

So I send: http://192.168.1.x:6296/MLCmd?MLServeCm ... |Add.These

How do I pass the values?

How would I make MLServer send back the info requested in the macro?

Then the macro has to push the answer back. I also have a tab in my application "script" that allows me to run a script in PHP, ASP, Servlet (java) or PERL. not sure if that's useful.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Web URL command

Postby CinemarDave » Wed Jul 20, 2011 8:00 pm

MLServer will accept commands via the web server. Syntax is

http://<<server address>>:6246/command?<<Any Valid MLServer Command>> e.g.

http://<<server address>>:6246/command?MLMath|Add~1~2~Foobar

However you are not going to get any response back. MLSever will just consume the command. If you wanted to get the value of a variable back I would have to implement something like

http://<<server address>>:6246/getvariable?foobar

but the latter does not exist today. Is this what you are looking for?

Art Dustman
Expert
Expert
Posts: 576
Joined: Fri Nov 10, 2006 3:22 pm
Location: NJ
Contact:

Re: Web URL command

Postby Art Dustman » Thu Jul 21, 2011 8:13 am

Yes. I think so.

I'm poking around with some of the features of a phone system here. It will run HTTP requests before a call is answered, so I can possibly get weather and all other sorts of data that sit in MLServer. It has a tab for "response" which is where I assume the http://<<server address>>:6246/getvariable?foobar would put it.


Return to “MLServer 3”

Who is online

Users browsing this forum: No registered users and 2 guests