gurudutt.rv has asked for the
wisdom of the Perl Monks concerning the following question:
I have a server application which accepts http(s) requests like this http://xyz.com/click/phoenix/339cd9314fe0136d3c30f6e9984b1ddc?clickId=sfshsksk1234go.
There are two steps to this request, first, when the above url is requested it responds with a JS code and this has to be executed in turn to complete the request to the server.
When i open this in the browser, the whole path would work fine since browser executes JS.
But how do i simulate the same in a perl script, the machine on which i run this is ubuntu 10.0.4 and does not have ui (so does not have firefox or other things to use www mechanize firefox and the likes)
1) Request http://xyz.com/click/phoenix/339cd9314fe0136d3c30f6e9984b1ddc?clickId=sfshsksk1234go
2) set xforwarded proto for the above request.
3) Execute the JS of the intermediate response to complete the request.
Any help would be much appreciated.