Aug 30, 2012; 03:57
Jolle Carlestam
Using curl in Lasso 9
The other week I answered a question about using curl on Lasso 9.
This is the code I came up with to test that my answer was proper.
Someone might find it useful. Especially if you plan on having someone else site look as if it came from you. Thought I'd post it here before I delete it.
local(myurl = 'http://www.lassosoft.com')
local(mypath = '/lassoDocs/languageReference')
local(mycurl = curl(#myurl + #mypath))
#mycurl -> postFields ='action=search&q=curl&s=-1'
local(myresult = #mycurl -> result)
// Replace all local links so they continue to work
#myresult -> replace('src="/', '#####')
#myresult -> replace('src="', 'src="' + #myurl + #mypath)
#myresult -> replace('#####', 'src="' + #myurl + '/')
#myresult -> replace('href="/', 'href="' + #myurl + '/')
#myresult -> replace('curl', 'r=E4ksm=F6rg=E5s')
#myresult
HDB
Jolle
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso
Lasso@lists.lassosoft.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>