Page 1 of 1
RESTful Applications
Posted: Fri Jun 24, 2011 5:24 pm
by Kevin
I am attempting to access RESTful web services. As suggested in prior postings I am investigating cURL via "open process" due to security concerns I can only address the process via stdin and stdout (passwords/data on the command line would be visible by other users). So, I am currently using “open process” and passing a command line that causes cURL to prompt for the users password (--user “user” since no password is specified it will prompt). “Runtime Revolution”/”LiveCode” or whatever they are calling it this week does not see any of the output when I invoke “read from process” (at least until the process has ended). Any assistance would be appreciated a HTTP library that actually works according to the asynchronous model of “Runtime Revolution”/”Live Code” would also be appreciated.
Any suggestions?
Kevin
Re: RESTful Applications
Posted: Fri Jun 24, 2011 11:54 pm
by Mark
Kevin,
Post your script.
Watch
this.
Oh... and you may be unable to read and write to the process to enter the password. You may have to echo and pipe it, like
Kind regards,
Mark
Re: RESTful Applications
Posted: Sat Jun 25, 2011 3:44 am
by Kevin
Visited a posting with a similar suggestion had success with *nix systems unfortunately not with Windoze.
Re: RESTful Applications
Posted: Sat Jun 25, 2011 3:46 am
by Kevin
It also has issues with security and other users capable of viewing the command line for processes.
Re: RESTful Applications
Posted: Sat Jun 25, 2011 3:57 am
by Kevin
Sorry, allow me to elaborate even using this syntax above results in security related information being read by Top or Task Mangler. As another developer stated what is the point of in flight encryption and etc, when the password, user, ... are in plain site. Like I previously said I would prefer a pure transcript solution. I currently utilize a completely asynchronous pure transcript STOMP library I created unfortunately some of those utilizing the workbench are behind firewalls which interfere with the library. The message broker I am using also support RESTful and cURL support all forms of authentication and proxies so it would be a easy move if I could actually communicate with it via stdin and stdout.
Re: RESTful Applications
Posted: Sat Jun 25, 2011 4:38 am
by Kevin
Test code Windoze...
on mouseUp
local _rpc
local _cmd
put "C:\_KJW\CURL\CURL.EXE" & space & "--user" & space & QQ("root") & space & "--url" & space & QQ("
http://localhost:8080/Absinthe") into _cmd
kill 9 process _cmd
put XMLRPC_Invoke("_ListMethods") into _rpc
open process _cmd for binary update
encode _cmd
send "TListMethods" & space & QQ(_cmd) to me in 1 millisecond
end mouseup
on TListMethods aApplication, aMessage
decode aApplication
decode aMessage
local _processes
put openProcesses() into _processes
if aApplication is not among the lines of _processes then
exit TListMethods
end if
read from process aApplication until ":" in 50 milliseconds
if empty is not it then
put it after aMessage
end if
if aMessage contains ":" then
write numToChar(13) & numToChar(10) to process aApplication
else
encode aApplication
encode aMessage
send "TListMethods" & space & aApplication & comma & aMessage to me in 50 milliseconds
end if
end TListMethods