cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: how to exceute script instaed of downloading it

From: Fredrik Gustafsson <iveqy_at_iveqy.com>
Date: Fri, 14 Sep 2012 19:18:25 +0200

On Fri, Sep 14, 2012 at 09:17:09PM +0530, Shoeb Ali wrote:
> Hi,
> when i do "curl http://myserver.com/Test.jsp" curl downloads Test.jsp. What i want is execute the Test.jsp and see the result. Please help me.
> //what i see on the console.
> function processStateChange() {
> if (req.readyState == 4) { // Complete
> //alert(req.readyState);
> if (req.status == 200) { // OK response
> //alert(req.status);
> res="< LICENSERESPONSE > < LICENSE version=2.0.0.0>"+req.responseText+"< /LICENSE >< /LICENSERESPONSE >";
> //alert(req.responseText);
> document.getElementById('divId').innerHTML = res;
>
> } else {
> alert("Problem: " + req.statusText);
> }
> }
>
> // what i see in the browser and what i exactly want
> < LICENSERESPONSE > < LICENSE version=2.0.0.0> *DGD1rz2UdqU1qYR0OZ4nYL08jTaiFmHZyUlwn2WJiZuOA3dQEYHJtOX!Xx8P*YeDXWMSn*1i0HDJDItHSR1xtKPMuZDYcy7Jkc7wjGjCUSADXp2gqiVkSP < /LICENSE >< /LICENSERESPONSE >
>

Curl does network traffic, not javascript interpretion. I suggest you
read the javascript code, find out what it does and then do that locally
instead. Is the code above really everything you get?

-- 
Med vänliga hälsningar
Fredrik Gustafsson
tel: 0733-608274
e-post: iveqy_at_iveqy.com
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-09-14